Skip to content

Commit

Permalink
remove pipe and tar inside subshell to bypass github actions more lim…
Browse files Browse the repository at this point in the history
…ited permissions
  • Loading branch information
motdotla committed Jun 14, 2024
1 parent 9d62b7f commit 962b376
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,16 @@ install_dotenvx() {
local tmpdir=$(command mktemp -d)

# 2. download
pipe="$tmpdir/pipe"
mkfifo "$pipe"
# curl $(progress_bar) --fail -L --proto '=https' -o "$tmpdir/$(filename)" "$(download_url)"
curl $(progress_bar) --fail -L --proto '=https' "$(download_url)" > "$pipe" &
sh -c "tar xz --no-overwrite-dir --no-same-permissions --no-same-owner --directory $(directory) < '$pipe'" &
wait
# pipe="$tmpdir/pipe"
# mkfifo "$pipe"
curl $(progress_bar) --fail -L --proto '=https' -o "$tmpdir/$(filename)" "$(download_url)"

# curl $(progress_bar) --fail -L --proto '=https' "$(download_url)" > "$pipe" &
# sh -c "tar xz --no-overwrite-dir --no-same-permissions --no-same-owner --directory $(directory) < '$pipe'" &
# wait

# 3. decompress to install directory
# tar xz --directory $(directory) -f "$tmpdir/$(filename)"
sh -c "tar xz --directory $(directory) -f "$tmpdir/$(filename)""

# 4. clean up
rm -r "$tmpdir"
Expand Down

0 comments on commit 962b376

Please sign in to comment.