komplian 0.3.0 → 0.3.2
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/komplian-onboard.mjs +7 -4
- package/package.json +1 -1
package/komplian-onboard.mjs
CHANGED
|
@@ -128,9 +128,13 @@ function logGhIdentity() {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
function cmdExists(name) {
|
|
132
|
+
const r = spawnSync(name, ["--version"], { stdio: "ignore" });
|
|
133
|
+
return !r.error;
|
|
134
|
+
}
|
|
135
|
+
|
|
131
136
|
function needCmd(name, hint = "") {
|
|
132
|
-
|
|
133
|
-
if (r.status !== 0) {
|
|
137
|
+
if (!cmdExists(name)) {
|
|
134
138
|
log(`${c.red}✗${c.reset} Falta ${c.bold}${name}${c.reset} en el PATH.${hint ? ` ${hint}` : ""}`);
|
|
135
139
|
process.exit(1);
|
|
136
140
|
}
|
|
@@ -269,8 +273,7 @@ function copyCursorPack(workspace, cursorRepoUrl) {
|
|
|
269
273
|
function npmInstallEach(workspace) {
|
|
270
274
|
log("");
|
|
271
275
|
log(`${c.cyan}━━ npm install por repo ━━${c.reset}`);
|
|
272
|
-
|
|
273
|
-
if (r.status !== 0) {
|
|
276
|
+
if (!cmdExists("npm")) {
|
|
274
277
|
log(`${c.yellow}○${c.reset} npm no está en PATH — omito installs`);
|
|
275
278
|
return;
|
|
276
279
|
}
|
package/package.json
CHANGED