From 5365647d234d4476dd8fab764cf73cfe2fa2f506 Mon Sep 17 00:00:00 2001 From: rakhov Date: Wed, 9 Jul 2025 22:04:43 +0200 Subject: [PATCH] Change remote script to avoid changing working dir Before this commit, the script changed to a temporary directory to download and extract files. After this commit, the script uses absolute paths to work with files in the temp directory without changing the current working directory. --- scripts/remote.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/remote.sh b/scripts/remote.sh index 98ed586..3991d96 100755 --- a/scripts/remote.sh +++ b/scripts/remote.sh @@ -3,12 +3,11 @@ set -e TEMP=$(mktemp -d) trap "rm -rf $TEMP" EXIT -cd "$TEMP" - -# Downloading -curl -sL https://github.com/datalek/boil/releases/latest/download/boil-node-22.tgz -o archive.tgz +# Download and extract in temp (without changing working directory) +curl -sL https://github.com/datalek/boil/releases/latest/download/boil-node-22.tgz -o "$TEMP/archive.tgz" # Extracting -tar -xzf archive.tgz +tar -xzf "$TEMP/archive.tgz" -C "$TEMP" + # Redirect stdin to tty for interactive input -npx node dist/boil.cjs "$@" < /dev/tty +npx node "$TEMP/dist/boil.cjs" "$@" < /dev/tty