We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f23682 commit 051a071Copy full SHA for 051a071
cli/support.go
@@ -63,11 +63,6 @@ func (r *RootCmd) support() *clibase.Cmd {
63
64
deps.AgentID = agt.ID
65
66
- bun, err := support.Run(inv.Context(), &deps)
67
- if err != nil {
68
- return err
69
- }
70
-
71
if outputPath == "" {
72
cwd, err := filepath.Abs(".")
73
if err != nil {
@@ -83,6 +78,13 @@ func (r *RootCmd) support() *clibase.Cmd {
83
78
}
84
79
zwr := zip.NewWriter(w)
85
80
defer zwr.Close()
81
+
82
+ bun, err := support.Run(inv.Context(), &deps)
+ if err != nil {
+ _ = os.Remove(outputPath) // best effort
+ return xerrors.Errorf("create support bundle: %w", err)
86
+ }
87
88
if err := writeBundle(bun, zwr); err != nil {
89
return xerrors.Errorf("write support bundle to %s: %w", outputPath, err)
90
0 commit comments