goscript 0.0.4 → 0.0.5
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/cmd/goscript/main.js +2 -2
- package/package.json +1 -1
package/cmd/goscript/main.js
CHANGED
|
@@ -15,7 +15,7 @@ const args = process.argv.slice(2);
|
|
|
15
15
|
|
|
16
16
|
// Construct the go run command with the absolute path to the goscript executable
|
|
17
17
|
// Use path.join for robustness
|
|
18
|
-
const goscriptCmd = `go run
|
|
18
|
+
const goscriptCmd = `go run ./cmd/goscript`;
|
|
19
19
|
|
|
20
20
|
// Combine the goscript command with the arguments
|
|
21
21
|
const command = `${goscriptCmd} ${args.join(" ")}`;
|
|
@@ -24,7 +24,7 @@ const command = `${goscriptCmd} ${args.join(" ")}`;
|
|
|
24
24
|
const child = spawn(command, {
|
|
25
25
|
shell: true, // Use shell to correctly parse the command string
|
|
26
26
|
stdio: 'inherit', // Inherit stdin, stdout, and stderr
|
|
27
|
-
cwd:
|
|
27
|
+
cwd: projectRoot, // Execute in the current working directory where the script is run
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
child.on('error', (error) => {
|