Version update fails on non-standard SHELL

Open
#1,901 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go, shell
Domain
cli

Research direction

Start in internal/update/update.go around line 120 and reproduce with a non-standard SHELL such as es or rc using flyctl version update. Trace how the updater selects the shell for the curl installer command. Done means the command uses /bin/sh when available and only falls back to SHELL when /bin/sh does not exist, without passing incompatible quoting to curl.

Written by the indexing model from the issue text.

Description

bug good first issue
; ~/.fly/bin/flyctl version update
Update available 0.0.426 -> v0.0.487.
Run "flyctl version update" to upgrade.
/usr/local/bin/es -c
Running automatic update [curl -L "https://fly.io/install.sh" | sh]
curl: (3) URL using bad/illegal format or missing URL
Error exit status 1

This happens because es (and rc) use single quotes only, so the double quotes here are passed to curl. I'd suggest that this logic:

https://github.com/superfly/flyctl/blob/f991e5642bc377b2ee2ea10ae6a3d278f75117a7/internal/update/update.go#L120

should instead default to /bin/sh, and only fall back on SHELL if /bin/sh doesn't exist.

Dominant language
Go
Stars
1.7k
Forks
311
Avg merge
12h 50m
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from superfly/flyctl

All issues in superfly/flyctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.