Skip to content

Commit b0808a0

Browse files
committed
fix: scoping
1 parent bbf52d5 commit b0808a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ func checkForUpdate(ctx context.Context, currentVersion, artifactArch string, cm
163163

164164
wf, _, _ := utils.GetWorkflow()
165165

166-
// If a workflow file is present and specifies that the speakeasyVersion is "latest", don't display update notifications as it will be automatically updated when the command is run.
167-
if wf != nil && wf.SpeakeasyVersion.String() == "latest" {
166+
// If we are running the run command and a workflow file is present and specifies that the speakeasyVersion is "latest", don't display update notifications as it will be automatically updated when the command is run.
167+
if cmd.Name() == "run" && wf != nil && wf.SpeakeasyVersion.String() == "latest" {
168168
return
169169
}
170170

0 commit comments

Comments
 (0)