Environment#print_builder_run_message should support string commands - close #44

This commit is contained in:
josh committed 2017-08-03 14:10:53 -04:00
1 parent a9aeaf2356
commit 89562c584a
6 files changed
+43 -5

No files matched your search

+1 -2
View File
@@ -20,8 +20,7 @@ module Rscons
Ansi.write($stderr, :red, "Error: `#{target}' already exists and is not a directory", :reset, "\n")
false
else
desc = "Directory #{target}"
env.print_builder_run_message(desc, desc)
env.print_builder_run_message("Directory #{target}", nil)
cache.mkdir_p(target)
target
end
+1 -2
View File
@@ -43,8 +43,7 @@ module Rscons
# Check the cache and copy if necessary
unless cache.up_to_date?(dest, :Copy, [src], env)
unless printed_message
desc = "#{name} #{target}"
env.print_builder_run_message(desc, desc)
env.print_builder_run_message("#{name} #{target}", nil)
printed_message = true
end
cache.mkdir_p(File.dirname(dest))
+7 -1
View File
@@ -885,7 +885,13 @@ module Rscons
def print_builder_run_message(short_description, command)
case @echo
when :command
message = command_to_s(command) if command
if command.is_a?(Array)
message = command_to_s(command)
elsif command.is_a?(String)
message = command
elsif short_description.is_a?(String)
message = short_description
end
when :short
message = short_description if short_description
end