Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 31b5d02

Browse files
committed
notarize: use strutured errors to check for error 1519
1 parent 2f48e6b commit 31b5d02

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

notarize/notarize.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"context"
66
"fmt"
77
"os/exec"
8-
"strings"
98
"sync"
109
"time"
1110

@@ -102,10 +101,7 @@ func Notarize(ctx context.Context, opts *Options) (*Info, error) {
102101

103102
// If we got error code 1519 that means that the UUID was not found.
104103
// This means we're in a queue.
105-
//
106-
// There is definitely a more robust way to check for this and
107-
// we should do that in the future. For now this works.
108-
if strings.Contains(err.Error(), "1519") {
104+
if e, ok := err.(Errors); ok && e.ContainsCode(1519) {
109105
continue
110106
}
111107

0 commit comments

Comments
 (0)