From e3b3cd9cec4a3bd12a792536c0ea131f5ba5bd72 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Thu, 10 Jan 2019 10:06:23 +0100 Subject: [PATCH] Avoid duplicating user path entries Resolves: #1652639 --- bash.spec | 6 +++++- dot-bashrc | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bash.spec b/bash.spec index c5d226d..7975cdb 100644 --- a/bash.spec +++ b/bash.spec @@ -7,7 +7,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/bash Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz @@ -320,6 +320,10 @@ end %{_libdir}/pkgconfig/%{name}.pc %changelog +* Thu Jan 10 2019 Siteshwar Vashisht - 4.4.23-6 +- Avoid duplicating user path entries + Resolves: #1652639 + * Mon Oct 08 2018 Siteshwar Vashisht - 4.4.23-5 - Fix some issues identified by coverity diff --git a/dot-bashrc b/dot-bashrc index 68854a1..d81e0b5 100644 --- a/dot-bashrc +++ b/dot-bashrc @@ -6,7 +6,10 @@ if [ -f /etc/bashrc ]; then fi # User specific environment -PATH="$HOME/.local/bin:$HOME/bin:$PATH" +if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] +then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi export PATH # Uncomment the following line if you don't like systemctl's auto-paging feature: