@neuro.corp/dash 1.0.7 → 1.0.8
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/bin/dash.js +5 -1
- package/package.json +1 -1
package/bin/dash.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
|
|
6
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
8
|
|
|
@@ -52,6 +53,9 @@ if (platform in platformMap) {
|
|
|
52
53
|
process.exit(1);
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
// CLI arguments
|
|
57
|
+
const args = process.argv.slice(2);
|
|
58
|
+
|
|
55
59
|
// Robust resolution of the platform package.
|
|
56
60
|
// Walk up from the script's directory to find the platform package in node_modules.
|
|
57
61
|
// This works whether Dash is installed globally or as a project dependency.
|
|
@@ -102,7 +106,7 @@ if (platform !== "win32" && (stat.mode & 0o111) === 0) {
|
|
|
102
106
|
|
|
103
107
|
// Execute the binary, forwarding all CLI arguments,
|
|
104
108
|
// preserving terminal input/output, and propagating exit code
|
|
105
|
-
|
|
109
|
+
import { spawn } from "node:child_process";
|
|
106
110
|
const child = spawn(executablePath, args, {
|
|
107
111
|
stdio: "inherit"
|
|
108
112
|
});
|