lib/zold/commands/push.rb in zold-0.6 vs lib/zold/commands/push.rb in zold-0.6.1
- old
+ new
@@ -37,20 +37,21 @@
@remotes = remotes
@log = log
end
def run(args = [])
- opts = Slop.parse(args, help: true) do |o|
+ opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
o.banner = "Usage: zold push [ID...] [options]
Available options:"
o.bool '--help', 'Print instructions'
end
if opts.help?
@log.info(opts.to_s)
return
end
- raise 'At least one wallet ID is required' if opts.arguments.empty?
- opts.arguments.each do |id|
+ mine = opts.arguments[1..-1]
+ raise 'At least one wallet ID is required' if mine.empty?
+ mine.each do |id|
push(@wallets.find(Id.new(id)), opts)
end
end
def push(wallet, _)