Skip to content

Commit

Permalink
feat: add bsf dockerfile digests command
Browse files Browse the repository at this point in the history
Signed-off-by: hanshal101 <[email protected]>
  • Loading branch information
hanshal101 authored and hanshal101 committed Jul 26, 2024
1 parent 5e5e098 commit 88cea2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/dockerfile/digests.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ func processOutput(path string, modified map[string]string) error {
return fmt.Errorf("failed to open file %s: %w", path, err)
}

var deferErr error
defer func(f billy.File) {
if err := f.Close(); err != nil {
fmt.Println(styles.ErrorStyle.Render("failed to close file %s: %v", path, err.Error()))
deferErr = fmt.Errorf("failed to close file %s: %w", path, err)
}
}(f)
if deferErr != nil {
return deferErr
}

out = f

Expand Down

0 comments on commit 88cea2d

Please sign in to comment.