Skip to content

Commit

Permalink
Update install scripts from main
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2024
1 parent 3455247 commit b80872a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.LINK
https://github.com/prefix-dev/pixi
.NOTES
Version: v0.39.1
Version: v0.39.2
#>
param (
[string] $PixiVersion = 'latest',
Expand Down
15 changes: 13 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
# Version: v0.39.1
# Version: v0.39.2

__wrap__() {

Expand Down Expand Up @@ -93,8 +93,19 @@ mkdir -p "$BIN_DIR"
if [[ "$(uname -o)" == "Msys" ]]; then
unzip "$TEMP_FILE" -d "$BIN_DIR"
else
tar -xzf "$TEMP_FILE" -C "$BIN_DIR"
# Extract to a temporary directory first
TEMP_DIR=$(mktemp -d)
tar -xzf "$TEMP_FILE" -C "$TEMP_DIR"

# Find and move the `pixi` binary, making sure to handle the case where it's in a subdirectory
if [[ -f "$TEMP_DIR/pixi" ]]; then
mv "$TEMP_DIR/pixi" "$BIN_DIR/"
else
mv "$(find "$TEMP_DIR" -type f -name pixi)" "$BIN_DIR/"
fi

chmod +x "$BIN_DIR/pixi"
rm -rf "$TEMP_DIR"
fi

echo "The 'pixi' binary is installed into '${BIN_DIR}'"
Expand Down

0 comments on commit b80872a

Please sign in to comment.