mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
fix(cmd/csvauth): use errors.Is(err, ErrInQuestion) correctly
This commit is contained in:
parent
b4886aa710
commit
6e0c91feb4
@ -320,7 +320,7 @@ func handleSet(args []string, aesKey []byte, csvFile csvauth.NamedReadCloser) {
|
|||||||
var exists bool
|
var exists bool
|
||||||
if len(*purpose) > 0 && *purpose != "login" {
|
if len(*purpose) > 0 && *purpose != "login" {
|
||||||
if _, err := auth.LoadServiceAccount(*purpose); err != nil {
|
if _, err := auth.LoadServiceAccount(*purpose); err != nil {
|
||||||
if !errors.Is(csvauth.ErrNotFound, err) {
|
if !errors.Is(err, csvauth.ErrNotFound) {
|
||||||
fmt.Fprintf(os.Stderr, "could not load %s: %v\n", *purpose, err)
|
fmt.Fprintf(os.Stderr, "could not load %s: %v\n", *purpose, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -330,7 +330,7 @@ func handleSet(args []string, aesKey []byte, csvFile csvauth.NamedReadCloser) {
|
|||||||
_ = auth.CacheServiceAccount(*c)
|
_ = auth.CacheServiceAccount(*c)
|
||||||
} else {
|
} else {
|
||||||
if _, err := auth.LoadCredential(name); err != nil {
|
if _, err := auth.LoadCredential(name); err != nil {
|
||||||
if !errors.Is(csvauth.ErrNotFound, err) {
|
if !errors.Is(err, csvauth.ErrNotFound) {
|
||||||
fmt.Fprintf(os.Stderr, "could not load %s: %v\n", name, err)
|
fmt.Fprintf(os.Stderr, "could not load %s: %v\n", name, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user