Skip to content

Commit 099cf9f

Browse files
committed
disable cmd output non-zero return code
1 parent 7980be5 commit 099cf9f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Download pre-built binaries from [GitHub Releases](https://github.com/cocoonstac
5050

5151
```bash
5252
# Linux amd64
53-
curl -fsSL -o cocoon.tar.gz https://github.com/cocoonstack/cocoon/releases/download/v0.3.6/cocoon_0.3.6_Linux_x86_64.tar.gz
53+
curl -fsSL -o cocoon.tar.gz https://github.com/cocoonstack/cocoon/releases/download/v0.3.9/cocoon_0.3.9_Linux_x86_64.tar.gz
5454
tar -xzf cocoon.tar.gz
5555
install -m 0755 cocoon /usr/local/bin/
5656

cmd/vm/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ func (h Handler) Exec(cmd *cobra.Command, args []string) error {
7474
return fmt.Errorf("exec: %w", err)
7575
}
7676
if code != 0 {
77+
// Suppress cobra's "Error: exit code N" so callers (e.g. vk-cocoon) only see the child's own output + exit code.
78+
cmd.SilenceErrors = true
7779
return &ExecExitError{Code: code}
7880
}
7981
return nil

0 commit comments

Comments
 (0)