Skip to content

Commit

Permalink
Replace version subcommand w/ --version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke committed Jul 7, 2024
1 parent 7d597fa commit ea11f63
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/mstrap/cli.cr
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,12 @@ DESC
end
end

cmd.commands.add do |version_cmd|
version_cmd.use = "version"
version_cmd.short = "Prints version number."
version_cmd.long = version_cmd.short
version_cmd.run do |_, _|
puts "mstrap v#{MStrap::VERSION}"
cmd.run do |options, _|
if options.bool["version"]
puts MStrap::VERSION
exit
end
end

cmd.run do |options, _|
cli_options = load_cli_options!(options)
load_bootstrap_options!(options)

Expand Down

0 comments on commit ea11f63

Please sign in to comment.