fix: check if target/debug exists before looping for executables
1 file changed, +1 -1
+1-1custom-plugins/symlink_rust_executables.zsh
| @@ -15,7 +15,7 @@ SYMLINKED_PROGRAMS=() | ||
| 15 | 15 | # Your next command will switch out the symlink. |
| 16 | 16 | function _symlink_rust_executables() { |
| 17 | 17 | [[ "$SYMLINK_DEBUGGING_MODE" == "1" ]] && echo "searching target/$SYMLINK_RUST_ENV for executables" |
| 18 | - for exe in target/${SYMLINK_RUST_ENV:-debug}/*; do | |
| 18 | + [[ -d target/$SYMLINK_RUST_ENV ]] && for exe in target/$SYMLINK_RUST_ENV/*; do | |
| 19 | 19 | [[ -f "$exe" && -x "$exe" ]] || continue |
| 20 | 20 | local name="$(basename "$exe")" |
| 21 | 21 | local src="$(realpath "$exe")" |