From de0b458216509d279b8b2f13379161ea4807c3a4 Mon Sep 17 00:00:00 2001 From: simulot Date: Tue, 28 May 2024 19:12:01 +0200 Subject: [PATCH] Better handling of archive name with wildcards that matches with no file Fixes #266 --- cmd/upload/upload.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/upload/upload.go b/cmd/upload/upload.go index ee079cb8..3070dc12 100644 --- a/cmd/upload/upload.go +++ b/cmd/upload/upload.go @@ -75,6 +75,9 @@ func UploadCommand(ctx context.Context, common *cmd.SharedFlags, args []string) if err != nil { return err } + if len(app.fsyss) == 0 { + return nil + } return app.run(ctx) } @@ -182,7 +185,10 @@ func newCommand(ctx context.Context, common *cmd.SharedFlags, args []string) (*U if err != nil { return nil, err } - + if len(app.fsyss) == 0 { + fmt.Println("No file found matching the pattern: ", strings.Join(cmd.Args(), ",")) + app.Log.Info("No file found matching the pattern: " + strings.Join(cmd.Args(), ",")) + } return &app, nil }