Skip to content

Commit

Permalink
refactor builderInfo output code
Browse files Browse the repository at this point in the history
Signed-off-by: Darshan Kumar <itsdarshankumar@gmail.com>
  • Loading branch information
itsdarshankumar committed Apr 10, 2023
1 parent 3d8681b commit 120097b
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions pkg/client/inspect_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,7 @@ func (c *Client) InspectBuilder(name string, daemon bool, modifiers ...BuilderIn
if errors.Is(err, image.ErrNotFound) {
return nil, nil
}
return nil, err
}

if info.Extensions != nil {
return &BuilderInfo{
Description: info.Description,
Stack: info.StackID,
Mixins: info.Mixins,
RunImage: info.RunImage,
RunImageMirrors: info.RunImageMirrors,
Buildpacks: info.Buildpacks,
Order: info.Order,
BuildpackLayers: info.BuildpackLayers,
Lifecycle: info.Lifecycle,
CreatedBy: info.CreatedBy,
Extensions: info.Extensions,
OrderExtensions: info.OrderExtensions,
}, nil
return nil, errexport PATH="$PATH:$HOME/go/bin"
}

return &BuilderInfo{
Expand All @@ -125,5 +108,7 @@ func (c *Client) InspectBuilder(name string, daemon bool, modifiers ...BuilderIn
BuildpackLayers: info.BuildpackLayers,
Lifecycle: info.Lifecycle,
CreatedBy: info.CreatedBy,
Extensions: info.Extensions,
OrderExtensions: info.OrderExtensions,
}, nil
}

0 comments on commit 120097b

Please sign in to comment.