MCPcopy Index your code
hub / github.com/acode/cli / legacypath

Method legacypath

cli/config.js:38–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 legacypath () {
39 let cwd = process.cwd();
40 let directories = cwd.split(path.sep);
41 let pathname;
42 for (let i = directories.length; i > 0; i--) {
43 let relpath = path.join(directories.slice(0, i).join(path.sep), LEGACY_FILENAME);
44 if (fs.existsSync(relpath)) {
45 pathname = relpath;
46 break;
47 }
48 }
49 return pathname;
50 }
51
52 load () {
53 if (!fs.existsSync(this.fullpath())) {

Callers 1

loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected