这是indexloc提供的服务,不要输入任何密码
Skip to content

bash: user's ~/.bashrc shouldn't be sourced in system bash.bashrc #7981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/bash/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
_MAIN_VERSION=5.1
_PATCH_VERSION=8
TERMUX_PKG_VERSION=${_MAIN_VERSION}.${_PATCH_VERSION}
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/bash/bash-${_MAIN_VERSION}.tar.gz
TERMUX_PKG_SHA256=cc012bc860406dcf42f64431bcd3d2fa7560c02915a601aba9cd597a39329baa
TERMUX_PKG_DEPENDS="libandroid-support, libiconv, ncurses, readline (>= 8.0), termux-tools"
Expand Down
5 changes: 1 addition & 4 deletions packages/bash/etc-profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ for i in @TERMUX_PREFIX@/etc/profile.d/*.sh; do
done
unset i

# Source etc/bash.bashrc and ~/.bashrc also for interactive bash login shells:
# Source etc/bash.bashrc also for interactive bash login shells:
if [ "$BASH" ]; then
if [[ "$-" == *"i"* ]]; then
if [ -r @TERMUX_PREFIX@/etc/bash.bashrc ]; then
. @TERMUX_PREFIX@/etc/bash.bashrc
fi
if [ -r @TERMUX_HOME@/.bashrc ]; then
. @TERMUX_HOME@/.bashrc
fi
fi
fi