Skip to content

Commit

Permalink
Add --debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
adam12 committed Apr 13, 2024
1 parent a811ec0 commit f33a88e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exe/rbz
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ parser = OptionParser.new do |parser|
parser.on("-c", "--compile", "Store compiled Ruby iseq")
parser.on("-m FILE", "--main FILE", "Main entrypoint")
parser.on("-o FILE", "--output FILE", File, "Output path (default: stdout)")
parser.on("--debug", "Enable debugging")
end
parser.parse!(into: options)

Expand All @@ -40,7 +41,7 @@ Gem::Package::TarWriter.new(io) do |writer|
writer.add_file(e + ".iseq", mode) { |fio| fio.write(contents) }
end

$stderr.puts "a #{e}" if $DEBUG
$stderr.puts "a #{e}" if options[:debug]
writer.add_file(e, mode) { |fio| fio.write(File.binread(e)) }
end
end
Expand Down

0 comments on commit f33a88e

Please sign in to comment.