summaryrefslogtreecommitdiff
path: root/cmd/goaes/commands/encrypt.go
diff options
context:
space:
mode:
authorLevi Durfee <levi.durfee@gmail.com>2026-01-08 18:29:23 -0500
committerLevi Durfee <levi.durfee@gmail.com>2026-01-08 18:29:23 -0500
commitab58e2a33750d58396a355843561ca05b6ce529a (patch)
tree3aa55fe00796afa3d427ba3a645323e4afdee75a /cmd/goaes/commands/encrypt.go
parent64fd2fc6b2c39ca55fa9635f33c3dde741d2ec2e (diff)
Require source string arg for encryption
Diffstat (limited to 'cmd/goaes/commands/encrypt.go')
-rw-r--r--cmd/goaes/commands/encrypt.go4
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"
}