lib/negroku/helpers/env.rb in negroku-2.0.3 vs lib/negroku/helpers/env.rb in negroku-2.1.0

- old
+ new

@@ -1,6 +1,6 @@ -# helper to build the add VAR cmd -def build_add_var_cmd(vars_file, key, value) +# helper to build the set VAR cmd +def build_set_var_cmd(vars_file, key, value) puts "#{vars_file} #{key} #{value}" cmd = "if awk < #{vars_file} -F= '{print $1}' | grep --quiet -w #{key}; then " cmd += "sed -i 's/^#{key}=.*/#{key}=#{value.gsub("\/", "\\/")}/g' #{vars_file};" cmd += "else echo '#{key}=#{value}' >> #{vars_file};" cmd += "fi"