Skip to content

Commit 41ecb3a

Browse files
committed
Add jt --verbose|-v to print more details
1 parent 868d29c commit 41ecb3a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tool/jt.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ def help
740740
* 'ruby' which uses the current Ruby executable in the PATH
741741
Default value is --use jvm, therefore all commands run on truffleruby-jvm by default.
742742
The default can be changed with `export RUBY_BIN=RUBY_SELECTOR`
743-
--silent Does not print the command and which Ruby is used
743+
--silent|-q Does not print the command and which Ruby is used
744+
--verbose|-v Print more details and commands
744745
--jdk Specifies which version of the JDK should be used: 11 (default) or 17
745746
746747
jt build [graalvm|parser|options|core-symbols] ... by default it builds graalvm
@@ -2104,7 +2105,7 @@ def graph(*args)
21042105
loop do # for --watch
21052106
compiled = false
21062107
command = [ruby_launcher, *vm_args, test_file]
2107-
# STDERR.puts bold "$ #{printable_cmd(command)}"
2108+
STDERR.puts bold "$ #{printable_cmd(command)}" if @verbose
21082109
IO.popen(command, err: [:child, :out]) do |pipe|
21092110
pipe.each_line do |line|
21102111
puts line
@@ -2962,6 +2963,7 @@ def process_pre_args(args)
29622963
needs_build = false
29632964
needs_rebuild = false
29642965
@silent = false
2966+
@verbose = false
29652967
@jdk_version = Integer(ENV['JT_JDK'] || 11)
29662968

29672969
until args.empty?
@@ -2975,6 +2977,8 @@ def process_pre_args(args)
29752977
@ruby_name = args.shift
29762978
when '-q', '--silent'
29772979
@silent = true
2980+
when '-v', '--verbose'
2981+
@verbose = true
29782982
when '--jdk'
29792983
@jdk_version = Integer(args.shift)
29802984
when '-h', '-help', '--help'

0 commit comments

Comments
 (0)