Fix broken Windows support #450
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Windows users, when running
fastly update
, will see an error telling them there is no supported release.This is misleading because there is in fact a Windows asset in each Fastly CLI release.
The root issue is that the CLI hardcodes
.tar.gz
as the asset release file extension, but for Windows we produce a.zip
.This PR rewrites the logic to better support Windows users.
Screenshots
The below screenshot demonstrates that
fastly update
now works (manually tested on a Windows 10 VM)...Yes I can see that the 'progress spinner' doesn't work on Windows. That's a separate issue that we'll want to try and fix.
UPDATE: I've partially improved the situation regarding the broken 'spinner' by disabling it for Windows users (both Cygwin users and those using the default 'command prompt')...
Although I've not been able to resolve the issue with the broken 'bold' text display (in the above image this would be the
←[1;32mSUCCESS: ←[0mUpdated Z:\cli\fastly.exe to 0.41.0.
). Although the spinner feature is broken in both Cygwin and the default 'command prompt', the bold text output actually works fine in Cygwin and is only broken in the default 'command prompt'. That said, I think most developers are unlikely to be using the default 'command prompt' and more likely to use either Cygwin or the more recent Linux/bash options within modern Windows.Notes
There have also been reports that using
compute serve
doesn't work for Windows users, and the problem is related to that which is fixed in this PR so hopefully the problems with Viceroy are also resolved in this PR.