diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c8e20d8..a48c82b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -87,5 +87,5 @@ jobs: - name: Run win32 tests if: matrix.os == 'windows-latest' - run: node --loader ts-node/esm --experimental-specifier-resolution=node ./src/test/ts/zurk.test.ts + run: node --loader ts-node/esm --experimental-specifier-resolution=node ./src/test/ts/spawn.test.ts timeout-minutes: 5 diff --git a/src/main/ts/spawn.ts b/src/main/ts/spawn.ts index dba1f01..1188101 100644 --- a/src/main/ts/spawn.ts +++ b/src/main/ts/spawn.ts @@ -74,7 +74,7 @@ export const normalizeCtx = (...ctxs: TSpawnCtx[]): TSpawnCtxNormalized => assig ee: new EventEmitter(), ac: new AbortController(), on: {}, - detached: true, + detached: process.platform !== 'win32', shell: true, spawn: cp.spawn, spawnSync: cp.spawnSync, diff --git a/src/test/ts/x.test.ts b/src/test/ts/x.test.ts index 812190a..61dbd5f 100644 --- a/src/test/ts/x.test.ts +++ b/src/test/ts/x.test.ts @@ -45,7 +45,7 @@ describe('$()', () => { const name = await $({input})`jq -r .name` assert.equal(name.toString().trim(), 'foo') - const stdin = fs.createReadStream(path.join(fixtures, 'foo.json')) + const stdin = fs.createReadStream(path.resolve(fixtures, 'foo.json')) const data = await $({stdin})`jq -r .data` assert.equal(data.toString().trim(), 'foobar')