Skip to content

Avoid snap curl #28

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 2 commits into from
May 6, 2025
Merged

Avoid snap curl #28

merged 2 commits into from
May 6, 2025

Conversation

konstin
Copy link
Member

@konstin konstin commented Apr 29, 2025

curl installed with snap is broken (boukendesho/curl-snap#1 (comment)), so we try to avoid it by using wget, and if that fails, we error eagerly.

@konstin
Copy link
Member Author

konstin commented Apr 29, 2025

@Gankra do you think this approach works?

@Gankra
Copy link
Collaborator

Gankra commented Apr 29, 2025

Oh interesting, I definitely like the idea!

You may also be interested in #26 (comment)

konstin added 2 commits April 29, 2025 22:35
curl installed with snap is broken (boukendesho/curl-snap#1 (comment)), so we try to avoid it by using wget, and if that fails, we error eagerly.
@konstin konstin force-pushed the konsti/no-snap-curl branch from 8693478 to 36fdade Compare April 29, 2025 20:35
@konstin
Copy link
Member Author

konstin commented Apr 29, 2025

I've manually tested this on local machine with snap and apt, are there any other validations to make sure this works as intended across shells?

@konstin konstin marked this pull request as ready for review April 29, 2025 20:37
@konstin konstin requested a review from Gankra April 29, 2025 20:37
@Gankra
Copy link
Collaborator

Gankra commented Apr 30, 2025

The main cross-shell validation is just that we run shellcheck with ksh as the target env, since it's like, the most barebones unix-standards-following shell. So as long as we only use constructs that should work in ksh, and it runs fine in bash, it tends to work fine everywhere.

@konstin
Copy link
Member Author

konstin commented May 2, 2025

I ran shellcheck -s ksh on the generated uv-installer.sh for uv and it only showed an unrelated warning, but no warning for the changed lines.

    RECEIPT="$(echo "$RECEIPT" | sed s/'"CARGO_DIST_BINS"'/"$_bins_js_array"/)"
               ^-- SC2001 (style): See if you can use ${variable//search/replace} instead.

@Gankra Gankra merged commit 1f6f74a into astral-sh:main May 6, 2025
13 checks passed
@Gankra
Copy link
Collaborator

Gankra commented May 6, 2025

Great improvement!

@Gankra
Copy link
Collaborator

Gankra commented May 6, 2025

(Also clarification: I meant shellcheck with dash, which is just configured and run as part of the test-suite. I always mix up those two because they're the two "worst" shells we support -- in the case of dash this is intentional, in the case of ksh it's because it belongs in hell.)

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.

2 participants