Skip to content

Commit ed07a84

Browse files
authored
Clarify PATH setup diagnostics
1 parent f06facc commit ed07a84

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

scripts/install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ install_binary() {
258258

259259
path_update_script() {
260260
cat << EOF
261-
# Surround PATH with colons so entries are matched exactly, not as partial directory names.
261+
# Surround PATH with colons so case matching guards against partial directory names,
262+
# such as treating /usr/local/binary as a match for /usr/local/bin.
262263
case ":\${PATH:-}:" in
263264
*:"$INSTALL_DIR":*) ;;
264265
*) export PATH="$INSTALL_DIR\${PATH:+:\$PATH}" ;;
@@ -287,7 +288,7 @@ configure_install_dir_path() {
287288
fi
288289

289290
if ! printf '%s\n' "$expected_profile" | cmp -s - "$PATH_PROFILE"; then
290-
log_error "Content mismatch after writing PATH profile: $PATH_PROFILE"
291+
log_error "Content verification failed for PATH profile: $PATH_PROFILE. The file may have been modified by another process or the disk write may have failed."
291292
return 1
292293
fi
293294

@@ -309,7 +310,7 @@ configure_install_dir_path() {
309310
fi
310311
;;
311312
*)
312-
log_error "Failed to add $INSTALL_DIR to PATH for this installer session"
313+
log_error "Failed to add $INSTALL_DIR to PATH after sourcing $PATH_PROFILE. The PATH profile may not have executed correctly."
313314
return 1
314315
;;
315316
esac

0 commit comments

Comments
 (0)