diff options
Diffstat (limited to 'sh')
-rw-r--r-- | sh/.profile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sh/.profile b/sh/.profile index 4ecea62..c311d4f 100644 --- a/sh/.profile +++ b/sh/.profile @@ -15,7 +15,7 @@ append_path() { } # Store original (system) paths to fix prioritization later -orig_path=$PATH +_path=$PATH # Use systemd-environment-d-generator(8) to generate environment, and export those variables # @@ -41,5 +41,7 @@ fi unset -f append_path # Fix PATH to prioritize user added paths -PATH="${PATH#"$orig_path":}"${orig_path:+:$orig_path} -export PATH +if [ -e "$_path" ]; then + PATH="${PATH#"$_path"}:$_path" + export PATH +fi |