feat: Don't add nonexistent directories to PATH

This commit is contained in:
Nick Novitski 2023-10-18 22:11:13 -07:00
parent a30a7fa1b3
commit c6e9a101ae

View file

@ -50,5 +50,8 @@ for ((i = ${#nix_path_array[@]} - 1; i >= 0; i--)); do
if contains "$nix_path_entry" "$PATH"; then if contains "$nix_path_entry" "$PATH"; then
continue continue
fi fi
if ! [ -d "$nix_path_entry" ]; then
continue
fi
echo "$nix_path_entry" >>"${GITHUB_PATH:-/dev/stderr}" echo "$nix_path_entry" >>"${GITHUB_PATH:-/dev/stderr}"
done done