lib/travis/cli/encrypt.rb in travis-1.8.3.travis.745.4 vs lib/travis/cli/encrypt.rb in travis-1.8.3.travis.773.4

- old
+ new

@@ -34,10 +34,11 @@ say color("Reading from stdin, press Ctrl+D when done", :info) if $stdin.tty? data = $stdin.read end data = split? ? data.split("\n") : [data.strip] + warn_env_assignments(data) encrypted = data.map { |data| repository.encrypt(data) } if config_key set_config encrypted.map { |e| { 'secure' => e } } save_travis_config @@ -93,9 +94,15 @@ when Hash then value else { 'matrix' => Array(value) } end traverse_config(hash[key], *rest) + end + + def warn_env_assignments(data) + if /env/.match(config_key) && data.find { |d| /=/.match(d).nil? } + warn "Environment variables in #{config_key} should be formatted as FOO=bar" + end end end end end