Skip to content

Commit

Permalink
Merge pull request #68 from replicatedhq/divolgin/better-messaging
Browse files Browse the repository at this point in the history
Better messaging when support bundle is uploaded
  • Loading branch information
divolgin authored Oct 17, 2019
2 parents e88e3a4 + 642c1d7 commit 2455f87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/troubleshoot/cli/run_nocrd.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,27 @@ the %s Admin Console to begin analysis.`
return nil
}

fileUploaded := false
for _, ac := range collector.Spec.AfterCollection {
if ac.UploadResultsTo != nil {
if err := uploadSupportBundle(ac.UploadResultsTo, archivePath); err != nil {
return errors.Wrap(err, "upload support bundle")
}
fileUploaded = true
} else if ac.Callback != nil {
if err := callbackSupportBundleAPI(ac.Callback, archivePath); err != nil {
return errors.Wrap(err, "execute callback")
}
}
}

fmt.Printf("\nA support bundle has been created in the current directory named %q\n", archivePath)
fmt.Printf("\r%s\r", cursor.ClearEntireLine())
if fileUploaded {
fmt.Printf("A support bundle has been created and uploaded to your cluster for analysis. Please visit the Troubleshoot page to continue.\n")
fmt.Printf("A copy of this support bundle was written to the current directory, named %q\n", archivePath)
} else {
fmt.Printf("A support bundle has been created in the current directory named %q\n", archivePath)
}
return nil
}

Expand Down

0 comments on commit 2455f87

Please sign in to comment.