puppyperpetual 1.2.2 → 1.2.3

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/README.md CHANGED
@@ -32,6 +32,8 @@ await perpetual.run();
32
32
 
33
33
  ## usage (as a node app thing)
34
34
 
35
+ note: on windows unless you spawn as worker, perpetual expects `C:\Program Files\Git\bin\bash.exe` to exist.
36
+
35
37
  as per tradition for my projects, simple installation!
36
38
 
37
39
  1. `npm i`
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "puppyperpetual",
3
3
  "type": "module",
4
4
  "types": "./src/index.d.ts",
5
- "version": "1.2.2",
5
+ "version": "1.2.3",
6
6
  "description": "Run stuff FOREVER! PERPETUALLY!",
7
7
  "main": "./src/index.js",
8
8
  "exports": {
@@ -104,7 +104,11 @@ export class ProcessManager {
104
104
  });
105
105
 
106
106
  } else {
107
- this.runningProcess = spawn('bash', ['-c', 'export FORCE_COLOR=3; ' + scriptPath], {
107
+ let bash = 'bash';
108
+ if (process.platform === 'win32') {
109
+ bash = this.options.winBashPath || '"C:\\Program Files\\Git\\bin\\bash.exe"';
110
+ }
111
+ this.runningProcess = spawn(bash, ['-c', 'export FORCE_COLOR=3; ' + scriptPath], {
108
112
  stdio: ['inherit', 'pipe', 'pipe'],
109
113
  env: { ...process.env },
110
114
  detached: process.platform !== 'win32',