Skip to content

Commit

Permalink
adding nil check for wsrefAuth
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Brough <[email protected]>
  • Loading branch information
ChevronTango committed Aug 29, 2023
1 parent a39718e commit b125e20
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ func (o *Orchestrator) Build(req *protocol.BuildRequest, resp protocol.ImageBuil
var additionalAuth []byte
if err == nil {
res := make(auth.ImageBuildAuth)
res[reference.Domain(wsref)] = registry.AuthConfig(*wsrefAuth)
if wsrefAuth != nil {
res[reference.Domain(wsref)] = registry.AuthConfig(*wsrefAuth)
}
workspaceAuth, err = json.Marshal(map[string]auth.ImageBuildAuth{"auths": res})
if err != nil {
return xerrors.Errorf("cannot marshal additional auth: %w", err)
Expand Down

0 comments on commit b125e20

Please sign in to comment.