From 89eb5b90185a00a715d40d9ff4cbcb8079e2f2a6 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 17 Jan 2023 05:10:40 -0800 Subject: [PATCH] Use -r over -f in bash si script -r is for 'readable', -f is for 'regular files' --- .../terminal/browser/media/shellIntegration-bash.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh b/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh index 7671b840c5e..8ca199fb6d5 100755 --- a/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh +++ b/src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh @@ -13,21 +13,21 @@ VSCODE_SHELL_INTEGRATION=1 # Run relevant rc/profile only if shell integration has been injected, not when run manually if [ "$VSCODE_INJECTION" == "1" ]; then if [ -z "$VSCODE_SHELL_LOGIN" ]; then - if [ -f ~/.bashrc ]; then + if [ -r ~/.bashrc ]; then . ~/.bashrc fi else # Imitate -l because --init-file doesn't support it: # run the first of these files that exists - if [ -f /etc/profile ]; then + if [ -r /etc/profile ]; then . /etc/profile fi # exceute the first that exists - if [ -f ~/.bash_profile ]; then + if [ -r ~/.bash_profile ]; then . ~/.bash_profile - elif [ -f ~/.bash_login ]; then + elif [ -r ~/.bash_login ]; then . ~/.bash_login - elif [ -f ~/.profile ]; then + elif [ -r ~/.profile ]; then . ~/.profile fi builtin unset VSCODE_SHELL_LOGIN