Skip to content

Commit 5ed21af

Browse files
authored
Use startsWith & simplify boolean expression (#543)
1 parent 041bcd9 commit 5ed21af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/concurrently.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('exiting conditions', () => {
183183
// Windows doesn't support sending signals like on POSIX platforms.
184184
// However, in a console, processes can be interrupted with CTRL+C (like a SIGINT).
185185
// This is what we simulate here with the help of a wrapper application.
186-
const child = run('"node fixtures/read-echo.js"', isWindows ? true : false);
186+
const child = run('"node fixtures/read-echo.js"', isWindows);
187187
// Wait for command to have started before sending SIGINT
188188
child.log.subscribe((line) => {
189189
if (/READING/.test(line)) {

src/spawn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const getSpawnOpts = ({
8888
return {
8989
cwd: cwd || process.cwd(),
9090
stdio: stdioValues,
91-
...(/^win/.test(process.platform) && { detached: false }),
91+
...(process.platform.startsWith('win') && { detached: false }),
9292
env: {
9393
...(colorSupport ? { FORCE_COLOR: colorSupport.level.toString() } : {}),
9494
...process.env,

0 commit comments

Comments
 (0)