Skip to content

Commit

Permalink
Send run summary to Spaces even without --summarize flag (#4785)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed May 3, 2023
1 parent bdf96aa commit 249f967
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/internal/runsummary/run_summary.go
Expand Up @@ -153,11 +153,15 @@ func (rsm *Meta) Close(ctx context.Context, exitCode int, workspaceInfos workspa

rsm.printExecutionSummary()

// If we're not supposed to save or if there's no spaceID
if !rsm.shouldSave || rsm.spaceID == "" {
// If we don't have a spaceID, we can exit now
if rsm.spaceID == "" {
return nil
}

return rsm.sendToSpace(ctx)
}

func (rsm *Meta) sendToSpace(ctx context.Context) error {
if !rsm.apiClient.IsLinked() {
rsm.ui.Warn("Failed to post to space because repo is not linked to a Space. Run `turbo link` first.")
return nil
Expand Down

0 comments on commit 249f967

Please sign in to comment.