Skip to content

Commit

Permalink
Merge pull request #799 from jpgeek/improve_error_message_for_inject_…
Browse files Browse the repository at this point in the history
…failure

Update error message for content already exists case.
  • Loading branch information
rafaelfranca committed Feb 23, 2023
2 parents 2d69011 + d1d420e commit 376e141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thor/actions/inject_into_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Actions
# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n")
# end
#
WARNINGS = { unchanged_no_flag: 'File unchanged! The supplied flag value not found!' }
WARNINGS = { unchanged_no_flag: 'File unchanged! Either the supplied flag value not found or the content has already been inserted!' }

def insert_into_file(destination, *args, &block)
data = block_given? ? block : args.shift
Expand Down

0 comments on commit 376e141

Please sign in to comment.