Include stderr in cred provider plugin errors

This commit is contained in:
Carter McKinnon 2023-04-18 10:35:30 -07:00
parent 1f0e718585
commit 766f6c3ad4

View File

@ -410,7 +410,7 @@ func (e *execPlugin) ExecPlugin(ctx context.Context, image string) (*credentialp
cmd.Env = mergeEnvVars(e.environ(), configEnvVars)
if err = e.runPlugin(ctx, cmd, image); err != nil {
return nil, err
return nil, fmt.Errorf("%w: %s", err, stderr.String())
}
data = stdout.Bytes()