Merge pull request #16712 from alrs/scan-err

pkg/scan: fix dropped error
This commit is contained in:
Vadim Bauer 2022-04-20 07:37:56 +02:00 committed by GitHub
commit 6ff23a4b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,9 +182,11 @@ func (j *Job) Run(ctx job.Context, params job.Parameters) error {
robotAccount, _ := extractRobotAccount(params)
var authorization string
var tokenURL string
authType, _ := extractAuthType(params)
if authType == authorizationBearer {
tokenURL, err := getInternalTokenServiceEndpoint(ctx)
tokenURL, err = getInternalTokenServiceEndpoint(ctx)
if err != nil {
return errors.Wrap(err, "scan job: get token service endpoint")
}