Skip to content

Commit

Permalink
fix: set detached false for win32 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 17, 2024
1 parent 9b4b9cf commit 4d4e3c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/main/ts/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/test/ts/x.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 4d4e3c0

Please sign in to comment.