@phren/cli 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mcp/dist/init.js +12 -3
- package/package.json +1 -1
package/mcp/dist/init.js
CHANGED
|
@@ -104,9 +104,18 @@ function parseRiskySectionsAnswer(raw, fallback) {
|
|
|
104
104
|
return Array.from(new Set(parsed));
|
|
105
105
|
}
|
|
106
106
|
function hasInstallMarkers(phrenPath) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
// Require at least two markers to consider this a real install.
|
|
108
|
+
// A partial clone or failed init may create one directory but not finish.
|
|
109
|
+
if (!fs.existsSync(phrenPath))
|
|
110
|
+
return false;
|
|
111
|
+
let found = 0;
|
|
112
|
+
if (fs.existsSync(path.join(phrenPath, "machines.yaml")))
|
|
113
|
+
found++;
|
|
114
|
+
if (fs.existsSync(path.join(phrenPath, ".config")))
|
|
115
|
+
found++;
|
|
116
|
+
if (fs.existsSync(path.join(phrenPath, "global")))
|
|
117
|
+
found++;
|
|
118
|
+
return found >= 2;
|
|
110
119
|
}
|
|
111
120
|
function resolveInitPhrenPath(opts) {
|
|
112
121
|
const raw = opts._walkthroughStoragePath || (process.env.PHREN_PATH) || DEFAULT_PHREN_PATH;
|