cobra parsed flags for `sww healthcheck`, so `--x` exited 2 with cobra's error and `-h` printed help and exited 0, where the issue keeps HealthCheck's own message and status 1 for any argument. The command now passes every argument to HealthCheck. Model: opus-5-5
This commit is contained in:
1 parent
504515c1d1
commit
d17f72d1ef
2 files changed
+14
-5
No files matched your search
@@ -89,6 +89,8 @@ func Main(version string) int {
|
||||
&cobra.Command{
|
||||
Use: "healthcheck",
|
||||
Short: "the container's health check",
|
||||
// HealthCheck refuses every argument itself, flags included.
|
||||
DisableFlagParsing: true,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
status = HealthCheck(
|
||||
cmd.Context(),
|
||||
|
||||
Reference in new issue
Block a user