builderman 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/dist/pipeline.js +13 -16
  2. package/package.json +1 -1
package/dist/pipeline.js CHANGED
@@ -68,25 +68,22 @@ export function pipeline(tasks) {
68
68
  PATH: newPath,
69
69
  Path: newPath,
70
70
  };
71
- // On Windows, use the shell from environment or default to cmd.exe
72
- // In Git Bash, use bash instead
73
- let shell = true;
74
- if (process.platform === "win32") {
75
- // Check if we're in Git Bash (SHELL env var is set)
76
- if (process.env.SHELL && process.env.SHELL.includes("bash")) {
77
- shell = process.env.SHELL;
78
- }
79
- else {
80
- // Use ComSpec (cmd.exe) or fallback
81
- shell = process.env.ComSpec || "cmd.exe";
82
- }
83
- }
84
- const child = spawn(command, {
71
+ // On Windows, use cmd.exe explicitly to avoid path resolution issues
72
+ // Using shell: true can cause issues with Git Bash paths
73
+ const spawnOptions = {
85
74
  cwd,
86
75
  stdio: ["inherit", "pipe", "pipe"],
87
- shell,
88
76
  env,
89
- });
77
+ };
78
+ if (process.platform === "win32") {
79
+ // Use cmd.exe explicitly on Windows
80
+ spawnOptions.shell = process.env.ComSpec || "cmd.exe";
81
+ }
82
+ else {
83
+ // On Unix-like systems, use shell: true
84
+ spawnOptions.shell = true;
85
+ }
86
+ const child = spawn(command, spawnOptions);
90
87
  // Handle spawn errors
91
88
  child.on("error", (error) => {
92
89
  console.error(`[${task.name}] Failed to start:`, error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builderman",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Simple task runner for building and developing projects.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",