Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@ repair_only_requested() {
[ "${MACROSCOPE_REPAIR_ONLY:-0}" = "1" ]
}

extract_tarball() {
local archive="$1"
local destination="$2"

# BSD tar warns on inherited locales like C.UTF-8 on macOS. Extract under a
# minimal known-good locale so release installs stay quiet across shells.
env -i \
PATH="$PATH" \
HOME="$HOME" \
TMPDIR="${TMPDIR:-/tmp}" \
LANG=C \
LC_ALL=C \
tar -xzf "$archive" -C "$destination"
}

get_codex_home() {
printf '%s' "${CODEX_HOME:-$HOME/.codex}"
}
Expand Down Expand Up @@ -728,7 +743,7 @@ fetch_plugin_bundle() {

mkdir -p "$CHECKOUT_DIR"
if curl -fL --progress-bar "$bundle_url" -o "$bundle_archive"; then
tar -xzf "$bundle_archive" -C "$CHECKOUT_DIR"
extract_tarball "$bundle_archive" "$CHECKOUT_DIR"
success "Fetched plugin bundle from ${BOLD}${INSTALL_VERSION}${RESET}"
else
error "Failed to download the released plugin bundle."
Expand Down