@stacksjs/cli 0.70.228 → 0.70.230
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/dist/index.js +11 -2
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -106,7 +106,16 @@ async function execSync(command, options) {
|
|
|
106
106
|
exitHandler("spawnSync", subprocess, exitCode, signalCode, error);
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
const stdout = proc.stdout?.toString() ?? "";
|
|
110
|
+
if (options?.throwOnError && proc.exitCode !== 0) {
|
|
111
|
+
const stderr = proc.stderr?.toString() ?? "";
|
|
112
|
+
const detail = (stderr.trim() || stdout.trim() || "(no output)").split(`
|
|
113
|
+
`).slice(0, 5).join(`
|
|
114
|
+
`);
|
|
115
|
+
throw new Error(`Command failed with exit code ${proc.exitCode}: ${cmd.join(" ")}
|
|
116
|
+
${detail}`);
|
|
117
|
+
}
|
|
118
|
+
return stdout;
|
|
110
119
|
}
|
|
111
120
|
function exitHandler(type, _subprocess, exitCode, signalCode, error) {
|
|
112
121
|
log.debug(`exitHandler: ${type}, exitCode: ${exitCode}, signalCode: ${signalCode}`);
|
|
@@ -494,7 +503,7 @@ var quotes = collect([
|
|
|
494
503
|
"Security is mostly a superstition. Life is either a daring adventure or nothing."
|
|
495
504
|
]);
|
|
496
505
|
// package.json
|
|
497
|
-
var version = "0.70.
|
|
506
|
+
var version = "0.70.230";
|
|
498
507
|
// src/helpers.ts
|
|
499
508
|
async function intro(command, options) {
|
|
500
509
|
return new Promise((resolve) => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/cli",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.230",
|
|
6
6
|
"description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"@stacksjs/clapp": "^0.2.12"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@stacksjs/collections": "0.70.
|
|
70
|
-
"@stacksjs/config": "0.70.
|
|
69
|
+
"@stacksjs/collections": "0.70.230",
|
|
70
|
+
"@stacksjs/config": "0.70.230",
|
|
71
71
|
"better-dx": "^0.2.17",
|
|
72
|
-
"@stacksjs/error-handling": "0.70.
|
|
73
|
-
"@stacksjs/logging": "0.70.
|
|
74
|
-
"@stacksjs/path": "0.70.
|
|
75
|
-
"@stacksjs/types": "0.70.
|
|
76
|
-
"@stacksjs/utils": "0.70.
|
|
77
|
-
"@stacksjs/validation": "0.70.
|
|
72
|
+
"@stacksjs/error-handling": "0.70.230",
|
|
73
|
+
"@stacksjs/logging": "0.70.230",
|
|
74
|
+
"@stacksjs/path": "0.70.230",
|
|
75
|
+
"@stacksjs/types": "0.70.230",
|
|
76
|
+
"@stacksjs/utils": "0.70.230",
|
|
77
|
+
"@stacksjs/validation": "0.70.230"
|
|
78
78
|
}
|
|
79
79
|
}
|