You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2023/08/04 06:00:19 UTC
[skywalking-cli] branch command-not-found-exit-code created (now 3bd802f)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch command-not-found-exit-code
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git
at 3bd802f Exit code should be non-0 when a command is not found
This branch includes the following new commits:
new 3bd802f Exit code should be non-0 when a command is not found
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking-cli] 01/01: Exit code should be non-0 when a command is not found
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch command-not-found-exit-code
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git
commit 3bd802fb35cfa2051285c5bfae2c3ab91ddd8db0
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Aug 4 14:00:12 2023 +0800
Exit code should be non-0 when a command is not found
---
pkg/util/commandNotFound.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pkg/util/commandNotFound.go b/pkg/util/commandNotFound.go
index a0a2b0a..be462bb 100644
--- a/pkg/util/commandNotFound.go
+++ b/pkg/util/commandNotFound.go
@@ -19,6 +19,7 @@ package util
import (
"fmt"
+ "os"
"github.com/urfave/cli/v2"
)
@@ -55,6 +56,7 @@ func CommandNotFound(c *cli.Context, s string) {
} else {
fmt.Printf("Run 'swctl %s --help' for usage.\n", parentCommand)
}
+ os.Exit(1)
}
// minEditDistance calculates the edit distance of two strings.