fix exit()
This commit is contained in:
parent
fbe8c494ec
commit
b3d0e8c058
10
src/pmng.cr
10
src/pmng.cr
@ -29,21 +29,21 @@ begin
|
||||
|
||||
parser.on "-v", "--version", "Show version" do
|
||||
puts "Version #{VERSION}"
|
||||
exit
|
||||
exit(0)
|
||||
end
|
||||
parser.on "-h", "--help", "Show help" do
|
||||
puts parser
|
||||
exit
|
||||
exit(0)
|
||||
end
|
||||
parser.on "-g", "--generate-password", "Generate password" do
|
||||
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:black).back(:white)
|
||||
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:red)
|
||||
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:blue)
|
||||
exit
|
||||
exit(0)
|
||||
end
|
||||
parser.on "-t", "--unixtime", "Return local timestamp" do
|
||||
puts Time.local.to_unix.colorize(:yellow)
|
||||
exit
|
||||
exit(0)
|
||||
end
|
||||
end
|
||||
rescue ex
|
||||
@ -74,7 +74,7 @@ while loop
|
||||
|
||||
if password_string.to_s == ":q"
|
||||
puts "Bye! 👋🏻"
|
||||
exit
|
||||
exit(0)
|
||||
elsif password_string.to_s == ":h"
|
||||
puts "Help:\n-----"
|
||||
puts ":s - Return stats"
|
||||
|
Loading…
Reference in New Issue
Block a user