Skip to content

Commit

Permalink
Merge pull request #959 from bullet-train-co/jeremy/scaffolding-roles…
Browse files Browse the repository at this point in the history
…-comment-fix

Allow for comments on key lines in `roles.yml`
  • Loading branch information
jagthedrummer authored Nov 21, 2024
2 parents 036d606 + 42bdfd7 commit 6715da2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def self.add_line_to_yml_file(file, content, location_array)
insert_after = 1
lines.each_with_index do |line, index|
break if current_needle.nil?
if line.strip == current_needle + ":"
if line.split("#").first.strip == current_needle + ":"
current_needle = location_array.shift.to_s
insert_after = index
current_space = line.match(/\s+/).to_s
Expand Down

0 comments on commit 6715da2

Please sign in to comment.