lib/kameleon/step.rb in kameleon-builder-2.7.2 vs lib/kameleon/step.rb in kameleon-builder-2.7.3

- old
+ new

@@ -35,10 +35,11 @@ "#{ lines.join "\n"}" end def value if @value.nil? + Kameleon.ui.debug("Parsed string = #{@string_cmd}") object = YAML.load(@string_cmd) if object.kind_of? Command @value = object elsif object.kind_of? String @value = nil @@ -56,13 +57,12 @@ @value = val end end @value rescue - lines = YAML.dump(object).gsub("---", "").strip - lines = lines.split( /\r?\n/ ).map {|l| "> #{l}" } - fail RecipeError, "Syntax error for microstep #{@microstep_name} : \n"\ - "#{ lines.join "\n"}" + fail RecipeError, "Syntax error after variable resolution for microstep #{@microstep_name}, parsed string =\n"\ + "#{@string_cmd}\n"\ + "Maybe you should remove trailing newline from variable using '>-' or '|-'" end def to_array if value.kind_of? Array map = value.map { |val| val.to_array }