crc-org / tray-electron

Archive of the Desktop/tray application of CRC Runs Containers
https://crc.dev
Apache License 2.0
4 stars 5 forks source link

developer terminal on windows doesn't work #187

Open anjannath opened 2 years ago

anjannath commented 2 years ago

issue is related to the path to crc executable, since the msi installs crc in C:\Program Files\CodeReady Containers\crc.exe and it contains a space ' ' in the path, when we pass it as argument to powershell.exe -Command it causes an error and no suitable way to escape the path has been found.

Full command used to launch powershell instance and run crc podman-env is:

powershell.exe -NoExit -command "&'C:\Program Files\CodeReady Containers\crc.exe podman-env | Invoke-Expression'"

https://github.com/code-ready/tray-electron/blob/809bd3d97aeefebaca4a360e96a21ce2bf09c10b/src/main.ts#L468-L479

PR #181 did not fix it

anjannath commented 2 years ago

since the msi adds the location of crc to path, we can just use crc instead of the absolute path