User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.
That would be a bug to change PATH in .bashrc. It’s only safe to change in .bash_profile. Becuase you cannot then override it in interactive sessions.
And indeed that ios where it’s being changed sigh…
$ sfind -f '.local/bin' 2>/dev/null
./skel/.bashrc:9: if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
./skel/.bashrc:10: PATH="$HOME/.local/bin:$HOME/bin:$PATH"
+ git log 739b272e5f5d10cf27a847a44d09eb7f4b6ec89b~..739b272e5f5d10cf27a847a44d09eb7f4b6ec89b
commit 739b272e5f5d10cf27a847a44d09eb7f4b6ec89b
Author: Siteshwar Vashisht <svashisht@redhat.com>
Date: Mon Sep 10 15:55:43 2018 +0200
Set custom PATH in non-login shells
.bash_profile is sourced only in login shells. Since .bash_profile
sources .bashrc, it should be safe to set custom PATH in .bashrc.
Resolves: #1615131