Skip to content

Commit 129c1a0

Browse files
fix: use POSIX character class in sed for macOS compatibility (#2)
Replace GNU-only \s with [[:space:]] in sed expressions so that uv_version extraction and checksum lookup work on BSD sed (macOS). Without this, \s silently fails, uv_version resolves to empty, and the download URL 404s. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent af11fb1 commit 129c1a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ _uv_download_url() {
3131
_uv_expected_hash() {
3232
local distro_toml="$1" target="$2"
3333
grep "^${target}" "$distro_toml" \
34-
| sed -E 's/^[^=]+=\s*"([^"]+)".*/\1/'
34+
| sed -E 's/^[^=]+=[[:space:]]*"([^"]+)".*/\1/'
3535
}
3636

3737
_bootstrap_uv() {
@@ -114,7 +114,7 @@ main() {
114114

115115
local uv_version
116116
uv_version="$(grep '^uv_version' "${script_dir}/distro.toml" \
117-
| sed -E 's/^[^=]+=\s*"?([^"#]+)"?.*/\1/' | tr -d '[:space:]')"
117+
| sed -E 's/^[^=]+=[[:space:]]*"?([^"#]+)"?.*/\1/' | tr -d '[:space:]')"
118118

119119
# Extract --prefix, --python, --isolated, and --quiet for bootstrap (all flags forwarded to setup.py)
120120
local prefix="" min_python="" isolated="" quiet=""

0 commit comments

Comments
 (0)