Skip to content

Commit

Permalink
refactor: use platform var.
Browse files Browse the repository at this point in the history
  • Loading branch information
knightedcodemonkey committed Jun 30, 2024
1 parent b0e8ca0 commit b680846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/duel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { argv } from 'node:process'
import { argv, platform } from 'node:process'
import { join, dirname, resolve, relative } from 'node:path'
import { spawn } from 'node:child_process'
// eslint-disable-next-line n/no-unsupported-features/node-builtins
Expand Down Expand Up @@ -45,7 +45,7 @@ const duel = async args => {
const runBuild = (project, outDir) => {
return new Promise((resolve, reject) => {
const args = outDir ? ['-p', project, '--outDir', outDir] : ['-p', project]
const build = spawn(tsc, args, { stdio: 'inherit', shell: true })
const build = spawn(tsc, args, { stdio: 'inherit', shell: platform === 'win32' })

build.on('error', err => {
reject(new Error(`Failed to compile: ${err.message}`))
Expand Down

0 comments on commit b680846

Please sign in to comment.