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
This commit is contained in:
Siteshwar Vashisht 2018-09-10 15:55:43 +02:00
parent 27e81f6958
commit 739b272e5f
3 changed files with 9 additions and 5 deletions

View File

@ -7,7 +7,7 @@
Version: %{baseversion}%{patchleveltag}
Name: bash
Summary: The GNU Bourne Again shell
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv3+
Url: https://www.gnu.org/software/bash
Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@ -317,6 +317,10 @@ end
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Mon Sep 10 2018 Siteshwar Vashisht <svashisht@redhat.com> - 4.4.23-4
- Set custom PATH in non-login shells
Resolves: #1615131
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.23-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View File

@ -6,7 +6,3 @@ if [ -f ~/.bashrc ]; then
fi
# User specific environment and startup programs
PATH=$HOME/.local/bin:$HOME/bin:$PATH
export PATH

View File

@ -5,6 +5,10 @@ if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=