diff options
| -rw-r--r-- | cmd/goaes/commands/encrypt.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/goaes/commands/encrypt.go b/cmd/goaes/commands/encrypt.go index 223502b..6f5c1fb 100644 --- a/cmd/goaes/commands/encrypt.go +++ b/cmd/goaes/commands/encrypt.go @@ -15,6 +15,10 @@ func Encrypt(ctx context.Context, cmd *cli.Command) error { source := cmd.StringArg("source") destination := cmd.StringArg("destination") + if source == "" { + return cli.Exit("missing source file", 2) + } + if destination == "" { destination = source + ".goaes" } |
