Skip to content

Commit 4304c94

Browse files
authored
fix: speakeasy run doesn't print out registry uris used for code samples in the output (#1653)
# What The CLI code didn't take into account the case where a user opted to upload code samples to one of our registry URIs rather than a local file.
1 parent 63c7055 commit 4304c94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/run/run.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,12 @@ func (w *Workflow) printGenerationOverview(ctx context.Context) error {
249249
additionalLines = append(additionalLines, "Review all targets with `speakeasy status`.")
250250
}
251251

252-
if t.CodeSamples != nil {
252+
// Covers the case where code samples are configured to be written to a local file
253+
if t.CodeSamples != nil && t.CodeSamples.Output != "" {
253254
additionalLines = append(additionalLines, fmt.Sprintf("Code samples overlay file written to %s", t.CodeSamples.Output))
255+
// Covers the case where code samples are configured to be published to a registry URI
256+
} else if t.CodeSamples != nil && t.CodeSamples.Registry != nil {
257+
additionalLines = append(additionalLines, fmt.Sprintf("Code samples uploaded to: %s", string(t.CodeSamples.Registry.Location)))
254258
}
255259

256260
if len(w.criticalWarns) > 0 {

0 commit comments

Comments
 (0)