cmd: hash-password: Fix broken terminal state on SIGINT (#3416)

* caddyauth: Fix hash-password broken terminal state on SIGINT

* caddycmd: Move TrapSignals calls to only subcommands that run long
This commit is contained in:
Francis Lavoie 2020-05-21 15:09:49 -04:00 committed by GitHub
parent 1dc4ec2d77
commit bb67e19d7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 9 deletions

View file

@ -51,8 +51,6 @@ func init() {
// Main implements the main function of the caddy command.
// Call this if Caddy is to be the main() if your program.
func Main() {
caddy.TrapSignals()
switch len(os.Args) {
case 0:
fmt.Printf("[FATAL] no arguments provided by OS; args[0] must be command\n")