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

Commit

Permalink
Merge pull request #188 from anjannath/master
Browse files Browse the repository at this point in the history
Issue #187 use crc instead of absolute path to crc
  • Loading branch information
praveenkumar authored Mar 4, 2022
2 parents 809bd3d + 5ce2a23 commit b443e4c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,6 @@ if (!gotTheLock) {
}
})

app.on('browser-window-focus', (e, w) => {
w.webContents.on('did-fail-load', () => {
w.webContents.reload()
})
})

app.whenReady().then(async () => {
if (needOnboarding()) {
showOnboarding()
Expand Down Expand Up @@ -464,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 b443e4c

Please sign in to comment.