impeccable 4.0.0 → 4.0.1
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/cli/bin/cli.js +9 -1
- package/package.json +1 -1
package/cli/bin/cli.js
CHANGED
|
@@ -68,6 +68,14 @@ async function locate() {
|
|
|
68
68
|
return download().catch((err) => { process.stderr.write(`impeccable: ${err.message}\n`); return null; });
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
// `--version` / `-v` is answered by the shim itself: the number users mean
|
|
72
|
+
// is this npm package's version, not the engine's (docs/CLI-CONTRACT.md).
|
|
73
|
+
const argv = process.argv.slice(2);
|
|
74
|
+
if (argv[0] === '--version' || argv[0] === '-v') {
|
|
75
|
+
process.stdout.write(`${pkg.version}\n`);
|
|
76
|
+
process.exit(0);
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
const bin = await locate();
|
|
72
80
|
if (!bin) {
|
|
73
81
|
process.stderr.write(
|
|
@@ -76,7 +84,7 @@ if (!bin) {
|
|
|
76
84
|
);
|
|
77
85
|
process.exit(127);
|
|
78
86
|
}
|
|
79
|
-
const result = spawnSync(bin,
|
|
87
|
+
const result = spawnSync(bin, argv, {
|
|
80
88
|
stdio: 'inherit',
|
|
81
89
|
env: { IMPECCABLE_SELF: 'npx impeccable', ...process.env },
|
|
82
90
|
});
|