From ab58e2a33750d58396a355843561ca05b6ce529a Mon Sep 17 00:00:00 2001 From: Levi Durfee Date: Thu, 8 Jan 2026 18:29:23 -0500 Subject: Require source string arg for encryption --- cmd/goaes/commands/encrypt.go | 4 ++++ 1 file changed, 4 insertions(+) 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" } -- cgit v1.2.3