We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf64c25 commit 3187878Copy full SHA for 3187878
1 file changed
paths
@@ -27,10 +27,11 @@ paths=(
27
"$HOME/.rd/bin" # Rancher
28
)
29
30
+new_path=""
31
for search_path in "${paths[@]}"; do
32
[[ -d $search_path ]] \
- && [[ ":$PATH:" != *":$search_path:"* ]] \
33
- && PATH=$search_path:$PATH
+ && [[ ":$new_path:" != *":$search_path:"* ]] \
34
+ && new_path="${new_path:+$new_path:}$search_path"
35
done
36
-export PATH
37
+export PATH="$new_path"
0 commit comments