From 4877dbf2a99152c41c3d9069523cfa19f21f51ac Mon Sep 17 00:00:00 2001 From: take-cheeze Date: Sat, 19 Oct 2019 01:42:34 +0900 Subject: Print mrbc command on verbose mode --- lib/mruby/build/command.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb index bff250c93..6e41e3db2 100644 --- a/lib/mruby/build/command.rb +++ b/lib/mruby/build/command.rb @@ -327,7 +327,9 @@ module MRuby infiles.each do |f| _pp "MRBC", f.relative_path, nil, :indent => 2 end - IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}", 'r+') do |io| + cmd = "#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}" + print("#{cmd}\n") if $verbose + IO.popen(cmd, 'r+') do |io| out.puts io.read end # if mrbc execution fail, drop the file -- cgit v1.2.3