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.
@@ -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 "${path.join(projectRoot, "cmd", "goscript")}"`;
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: process.cwd(), // Execute in the current working directory where the script is run
27
+ cwd: projectRoot, // Execute in the current working directory where the script is run
28
28
  });
29
29
 
30
30
  child.on('error', (error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goscript",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Go to TypeScript compiler",
5
5
  "bin": {
6
6
  "goscript": "./cmd/goscript/main.js"