diff options
| -rw-r--r-- | cmd/goaes/commands/commands.go | 1 | ||||
| -rw-r--r-- | cmd/goaes/commands/decrypt.go | 4 | ||||
| -rw-r--r-- | cmd/goaes/commands/encrypt.go | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/cmd/goaes/commands/commands.go b/cmd/goaes/commands/commands.go index 2a6f51e..9fda472 100644 --- a/cmd/goaes/commands/commands.go +++ b/cmd/goaes/commands/commands.go @@ -3,4 +3,5 @@ package commands const ( fileMode = 0600 PassphraseEnvVar = "GOAES_PASSPHRASE" + invalidArgsExit = 2 ) diff --git a/cmd/goaes/commands/decrypt.go b/cmd/goaes/commands/decrypt.go index 1fcd83e..dc87b58 100644 --- a/cmd/goaes/commands/decrypt.go +++ b/cmd/goaes/commands/decrypt.go @@ -16,11 +16,11 @@ func Decrypt(ctx context.Context, cmd *cli.Command) error { destination := cmd.StringArg("destination") if source == "" { - return cli.Exit("missing source", 2) + return cli.Exit("missing source", invalidArgsExit) } if destination == "" { - return cli.Exit("missing destination", 2) + return cli.Exit("missing destination", invalidArgsExit) } source = filepath.Clean(source) diff --git a/cmd/goaes/commands/encrypt.go b/cmd/goaes/commands/encrypt.go index 6f5c1fb..db924ee 100644 --- a/cmd/goaes/commands/encrypt.go +++ b/cmd/goaes/commands/encrypt.go @@ -16,7 +16,7 @@ func Encrypt(ctx context.Context, cmd *cli.Command) error { destination := cmd.StringArg("destination") if source == "" { - return cli.Exit("missing source file", 2) + return cli.Exit("missing source file", invalidArgsExit) } if destination == "" { |
