Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
use crc instead of absolute path to crc
Browse files Browse the repository at this point in the history
  • Loading branch information
anjannath committed Mar 4, 2022
1 parent e47c3b6 commit 5ce2a23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,14 @@ const prepareDevTerminalForPreset = async function(preset: DevTerminalType) {
default:
return false
}
//TODO: use iterm or iterm2 for macOS

if (isWin) {
var poshPath = which.sync("powershell.exe", { nothrow: true })

//TODO: use absolute path for crc binary
var cmd = `-NoExit -Command "&{crc ${command} | Invoke-Expression}"`
if (poshPath !== null) {
const posh = childProcess.spawn(poshPath, [`-NoExit -command "&'${crcBinary()} ${command} | Invoke-Expression'"`], {
const posh = childProcess.spawn(poshPath, [cmd], {
detached: true,
shell: true,
cwd: os.homedir(),
Expand Down

0 comments on commit 5ce2a23

Please sign in to comment.