Skip to content

Conversation

@lifeofguenter
Copy link
Contributor

Currently installing travis (bash completion) might add something like this into your .bashrc:

# added by travis gem
[ -f /Users/guenter/.travis/travis.sh ] && source /Users/guenter/.travis/travis.sh

This will unfortunately cause bash to spawn with a return-code of 1.

My fix will solve this issue and make sure that it will work if those files exist, and that it won't throw an error should they not exist:

    [ ! -s ~/.bashrc ] || echo yes; echo $? # file exists, outputs "yes", rc=0
yes
0
    [ ! -s ~/.bashrrc ] || echo yes; echo $? # file does not exist, outputs nothing, rc=0
0
    [ -s ~/.bashrc ] && echo yes; echo $? # file exists, outputs "yes", rc=0
yes
0
    [ -s ~/.bashrrc ] && echo yes; echo $? # file does not exist, outputs nothing, rc=1
1

@BanzaiMan BanzaiMan merged commit e6a6cbc into travis-ci:master Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants