Skip to content

Commit

Permalink
fix: ststiccheck SA1006
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinyblargon committed Dec 7, 2024
1 parent bbff06e commit d66b934
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxmox/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"io"
"log"
Expand Down Expand Up @@ -617,7 +618,7 @@ func (t *task) getTaskStatus_Unsafe(ctx context.Context, session *Session) (err
if v, isSet := status[taskApiKeyExitStatus]; isSet {
exitStatus := v.(string)
if !(strings.HasPrefix(exitStatus, "OK") || strings.HasPrefix(exitStatus, "WARNINGS")) {
return fmt.Errorf(exitStatus)
return errors.New(exitStatus)
}
}
return
Expand Down

0 comments on commit d66b934

Please sign in to comment.