mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 10:11:23 +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)
|
||||
if err != nil {
|
||||
return "", 0, err
|
||||
}
|
||||
|
||||
return resp.Auth.Token, ttl, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user