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