Skip to content

Commit

Permalink
Fixed crash when an invalid option in given
Browse files Browse the repository at this point in the history
  • Loading branch information
jo1gi committed Apr 7, 2021
1 parent abf59d8 commit b5e860b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: openurl
version: 0.1.0

authors:
- your-name-here <your-email-here>
- Joakim Holm <joakimholm@protonmail.com>

targets:
openurl:
Expand Down
3 changes: 3 additions & 0 deletions src/args.cr
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class Args
abort "An url is required"
end
end
parser.invalid_option do |flag|
abort "ERROR: '#{flag}' is not a valid option."
end
end
end
end

0 comments on commit b5e860b

Please sign in to comment.