Skip to content

Commit 0eda859

Browse files
committed
Clarify conditional structure
1 parent 0e566d7 commit 0eda859

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

iterative/resource_runner.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ func resourceRunnerCreate(ctx context.Context, d *schema.ResourceData, m interfa
206206
return resource.RetryableError(fmt.Errorf("Waiting for the machine to accept connections... %s", logError))
207207
} else if utils.HasStatus(logEvents, "terminated") {
208208
return resource.NonRetryableError(fmt.Errorf("Failed to launch the runner!"))
209-
} else if !utils.HasStatus(logEvents, "ready") {
210-
return resource.RetryableError(fmt.Errorf("Waiting for the runner to be ready..."))
209+
} else if utils.HasStatus(logEvents, "ready") {
210+
return nil
211211
}
212-
213-
return nil // The runner is ready.
212+
213+
return resource.RetryableError(fmt.Errorf("Waiting for the runner to be ready..."))
214214
})
215215

216216
if logError != nil {

0 commit comments

Comments
 (0)