MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getPlannotatorDataDir

Function getPlannotatorDataDir

packages/shared/data-dir.ts:28–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 * Falls back to ~/.plannotator when the env var is absent or empty.
27 */
28export function getPlannotatorDataDir(): string {
29 const envDir = process.env.PLANNOTATOR_DATA_DIR?.trim();
30 if (!envDir) {
31 return join(homedir(), ".plannotator");
32 }
33
34 // Expand ~ to home directory
35 const home = homedir();
36 if (envDir === "~") return home;
37 if (envDir.startsWith("~/") || envDir.startsWith("~\\")) {
38 return join(home, envDir.slice(2));
39 }
40
41 return resolve(envDir);
42}

Callers 15

getManagedSemBinaryPathFunction · 0.90
getDraftDirFunction · 0.90
storage.tsFile · 0.90
config.tsFile · 0.90
submitGlMRReviewFunction · 0.90
browser.tsFile · 0.90
getSessionsDirFunction · 0.90
readCuratedSkillNamesFunction · 0.90

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected