From 68dda75b199adab1d2540e8dfdb13313c3f5984f Mon Sep 17 00:00:00 2001 From: Gunter Grodotzki Date: Fri, 4 May 2018 14:54:25 +0200 Subject: [PATCH] Do not fail .bashrc if travis is not installed --- lib/travis/tools/completion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/travis/tools/completion.rb b/lib/travis/tools/completion.rb index bb82f1aa..c77d49bb 100644 --- a/lib/travis/tools/completion.rb +++ b/lib/travis/tools/completion.rb @@ -25,7 +25,7 @@ def install_completion RCS.each do |file| next unless File.exist? file and File.writable? file next if File.read(file).include? source - File.open(file, "a") { |f| f.puts("", "# added by travis gem", "[ -f #{cmp_file} ] && #{source}") } + File.open(file, "a") { |f| f.puts("", "# added by travis gem", "[ ! -s #{cmp_file} ] || #{source}") } end end