Skip to content

Commit

Permalink
Output optionparser on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
adam12 committed Apr 13, 2024
1 parent 0a54c3a commit c428b04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions exe/rbz
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ require "optionparser"
require "erb"

options = {}
OptionParser.new do |parser|
parser = OptionParser.new do |parser|
parser.banner = "Usage: rbz [options] folder"
parser.on("--iseq", "Store compiled Ruby iseq")
end.parse!(into: options)
end
parser.parse!(into: options)

source = ARGV[0] or abort "Error: Missing source directory"
source = ARGV[0] or abort(parser.to_s)
io = StringIO.new

Gem::Package::TarWriter.new(io) do |writer|
Expand Down

0 comments on commit c428b04

Please sign in to comment.