diff --git a/nix-develop-gha.sh b/nix-develop-gha.sh index 3c18193..eaaea0a 100755 --- a/nix-develop-gha.sh +++ b/nix-develop-gha.sh @@ -12,8 +12,7 @@ contains() { envOutput= # Iterate over the output of `env -0` in the shell environment -while IFS='=' read -r -d '' n v || exit "$n" -do +while IFS='=' read -r -d '' n v; do # If this variable is empty then we're in the first loop, and $n is the # output of the shellHook _before_ `env` is run. if ! [ "$envOutput" ]; then @@ -69,4 +68,4 @@ do fi # Add all environment variables except for PATH to GITHUB_ENV. printf "%s=%s\n" "$n" "$v" >>"${GITHUB_ENV:-/dev/stderr}" -done < <(set +e; nix develop "${arguments[@]}" --command bash -c "echo -ne '\0'; env -0"; printf '%s' "$?") +done < <(nix develop "${arguments[@]}" --command bash -c "echo -ne '\0'; env -0")