Skip to content
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

Fix finding on latest elan version in elan-init.sh. #74

Closed
wants to merge 1 commit into from
Closed

Fix finding on latest elan version in elan-init.sh. #74

wants to merge 1 commit into from

Conversation

lovettchris
Copy link
Contributor

fixes #73

local _latest=$(ensure curl -sSf "$ELAN_UPDATE_ROOT/latest" | cut -d'"' -f2 | awk -F/ '{print $NF}')
local _latest=$(ensure curl -Ls -o /dev/null -w %{url_effective} "$ELAN_UPDATE_ROOT/latest" | cut -d'"' -f2 | awk -F/ '{print $NF}')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like just adding L is enough to fix this? The -w flag seems pointless to me in the presense of -o /dev/null, and it's not clear to me that dropping S and f is beneficial.

(I'm using https://explainshell.com/explain?cmd=curl+-LsSf+-o+%2Fdev%2Fnull+-w+%25%7Burl_effective%7D for reference)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like just adding L is enough to fix this?

It doesn't for me. We want the redirection URL, not its content.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it's not clear to me that dropping S and f is beneficial.

I agree, though it's not terribly helpful without -o pipefail

@Kha
Copy link
Member

Kha commented May 3, 2022

Thanks for the analysis and fix, I pushed it as c586599.

@Kha Kha closed this May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elan-init fails with --default-toolchain none
3 participants