Skip to content

Commit b9b35a4

Browse files
committed
Fix bug that starting an already started server succeeds.
The code should catch when the server is already started and you try to call "scw start <id>" but currently that doesn't happen due to a typo s/!=/==/.
1 parent 63d079f commit b9b35a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/api/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func StartServer(api *ScalewayAPI, needle string, wait bool) error {
485485

486486
err := api.PostServerAction(server, "poweron")
487487
if err != nil {
488-
if err.Error() != "server should be stopped" {
488+
if err.Error() == "server should be stopped" {
489489
return fmt.Errorf("server %s is already started: %v", server, err)
490490
}
491491
}

0 commit comments

Comments
 (0)