cli
cli copied to clipboard
`fastly update` does not make the new binary executable on Linux
Version (this is the updated version:) Fastly CLI version v10.8.8 (6fc2fc1a) Built with go version go1.22.1 linux/amd64 (2024-03-19) Viceroy version: viceroy 0.9.4
What happened
I saw:
A new version of the Fastly CLI is available.
Current version: 10.8.6
Latest version: 10.8.8
Run `fastly update` to get the latest version.
and ran:
% fastly update
✓ Updating versioning information
Current version: 10.8.6
Latest version: 10.8.8
✓ Fetching latest release
✓ Replacing binary
SUCCESS: Updated /var/home/ian/bin/fastly to 10.8.8.
but then when I tried using the fastly command again I got:
zsh: permission denied: fastly
because the newly downloaded and installed ~/bin/fastly didn't have execute permissions. Somewhere in cli/pkg/commands/update/root.go you probably need to add an os.Chmod().
Thanks for opening this issue.
Interesting, as we do set chmod: https://github.com/fastly/cli/blob/main/pkg%2Fgithub%2Fgithub.go#L357-L360
Also in the same file we have SetBinPerms() but I can't see where it's called as I'm looking from my phone at the moment.
I see this behavior as well, on Debian Bookworm.