lib/travis/tools/completion.rb in travis-1.8.14.travis.1198.9 vs lib/travis/tools/completion.rb in travis-1.8.14.travis.1199.9
- old
+ new
@@ -23,10 +23,10 @@
source = "source " << cmp_file
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
def update_completion
mkdir_p(config_path)