#245 clarified in documentation that that Windows install instructions should be executed in a bash-based terminal.
However, the app's auto-upgrade message does not have any such clarification:
|
fmt.Fprintf(os.Stderr, "\nA newer version of waza is available: v%s \u2192 v%s. Run: %s\n", |
Which on Windows results in:
A newer version of waza is available: v0.31.0 → v0.33.0. Run: curl -fsSL https://raw.githubusercontent.com/microsoft/waza/main/install.sh | bash
So if I run the app from PowerShell, I might easily try put this command into a PowerShell terminal and end up with the upgrade being installed into WSL instead of my Windows operating environment. That's not great UX.
Really, the root cause seems to be the lack of a proper PowerShell-compatible install command. Bash on Windows is not a very mainstream terminal environment, so that is bound to cause trouble no matter how this message is structured. I suggest a PowerShell-native command be made available for installing the app and upgrading new versions. Perhaps the app can detect the terminal/environment type and suggest the appropriate command to upgrade when a new version is detected.
#245 clarified in documentation that that Windows install instructions should be executed in a bash-based terminal.
However, the app's auto-upgrade message does not have any such clarification:
waza/internal/version/check.go
Line 259 in a9b6055
Which on Windows results in:
So if I run the app from PowerShell, I might easily try put this command into a PowerShell terminal and end up with the upgrade being installed into WSL instead of my Windows operating environment. That's not great UX.
Really, the root cause seems to be the lack of a proper PowerShell-compatible install command. Bash on Windows is not a very mainstream terminal environment, so that is bound to cause trouble no matter how this message is structured. I suggest a PowerShell-native command be made available for installing the app and upgrading new versions. Perhaps the app can detect the terminal/environment type and suggest the appropriate command to upgrade when a new version is detected.