8000 Fix broken Windows support by Integralist · Pull Request #450 · fastly/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix broken Windows support #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 22, 2021
Merged

Conversation

Integralist
Copy link
Collaborator
@Integralist Integralist commented Oct 21, 2021

Windows users, when running fastly update, will see an error telling them there is no supported release.

unexpected error: no asset found for your OS (windows) and architecture (amd64)

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)...

Screenshot 2021-10-22 at 15 37 52

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')...

Screenshot 2021-10-22 at 16 58 01

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.

@Integralist Integralist added the bug Something isn't working label Oct 21, 2021
@Integralist Integralist changed the title Validate Windows is supported when downloading assets from GitHub Fix broken Windows support Oct 22, 2021
@Integralist Integralist force-pushed the integralist/validate-tar.gz-and-.zip branch 3 times, most recently from 79ca31d to 3ae80a8 Compare October 22, 2021 12:57
@Integralist Integralist force-pushed the integralist/validate-tar.gz-and-.zip branch from 3ae80a8 to c1b020b Compare October 22, 2021 13:08
@Integralist Integralist marked this pull request as ready for review October 22, 2021 14:38
NOTE: This doesn't fix the broken bold/colours rendering on the default
Windows 'command prompt' although it does work for Cygwin.
@Integralist Integralist merged commit 99c3f62 into main Oct 22, 2021
@Integralist Integralist deleted the integralist/validate-tar.gz-and-.zip branch October 22, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0