File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,20 @@ path_check_msg() {
151151install_motd_hooks_user () {
152152 # Install guarded blocks for common shells regardless of current $SHELL
153153 # Bash
154+ # Ensure ~/.local/bin precedes PATH in interactive shells so 'serverutils' resolves in subshells
155+ if ! grep -Fq " >>> SOLEN PATH_USER_LOCAL" " $HOME /.bashrc" 2> /dev/null; then
156+ solen_insert_marker_block " $HOME /.bashrc" \
157+ " # >>> SOLEN PATH_USER_LOCAL (do not edit) >>>" \
158+ " # <<< SOLEN PATH_USER_LOCAL (managed) <<<" \
159+ " $( cat << 'EOS '
160+ # Ensure ~/.local/bin on PATH
161+ if [ -d "$HOME/.local/bin" ]; then
162+ case ":$PATH:" in *":$HOME/.local/bin:"*) ;; *) PATH="$HOME/.local/bin:$PATH";; esac
163+ export PATH
164+ fi
165+ EOS
166+ ) "
167+ fi
154168 solen_insert_marker_block " $HOME /.bashrc" \
155169 " # >>> SOLEN MOTD_BASH (do not edit) >>>" \
156170 " # <<< SOLEN MOTD_BASH (managed) <<<" \
You can’t perform that action at this time.
0 commit comments