mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-05 10:20:36 +02:00
fixup: catch err from parseduration
This commit is contained in:
parent
79428aa231
commit
c4fe6496b5
@ -43,5 +43,9 @@ func getKubernetesToken(addr, role, mountPoint, tokenFile string) (string, time.
|
|||||||
}
|
}
|
||||||
|
|
||||||
ttl, err := time.ParseDuration(resp.Auth.Lease)
|
ttl, err := time.ParseDuration(resp.Auth.Lease)
|
||||||
|
if err != nil {
|
||||||
|
return "", 0, err
|
||||||
|
}
|
||||||
|
|
||||||
return resp.Auth.Token, ttl, nil
|
return resp.Auth.Token, ttl, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user