app-shells/bash: do not leave exit value non-zero in default profile script
authorMike Frysinger <vapier@gentoo.org>
Wed, 2 Dec 2015 18:57:52 +0000 (13:57 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 2 Dec 2015 18:58:52 +0000 (13:58 -0500)
If the .bashrc file does not exist, then the one line check in the profile
script leaves $? set to 1.  Use a full if statement to avoid that.

app-shells/bash/files/dot-bash_profile

index 94a6622b5c673442c67ffcf797b8ea396258c321..1de05a45e34a82a236cf1805ba4c20241b3c21ac 100644 (file)
@@ -2,4 +2,6 @@
 
 # This file is sourced by bash for login shells.  The following line
 # runs your .bashrc and is recommended by the bash info pages.
-[[ -f ~/.bashrc ]] && . ~/.bashrc
+if [[ -f ~/.bashrc ]] ; then
+       . ~/.bashrc
+fi