Skip to content

Commit

Permalink
Fix unchecked error values
Browse files Browse the repository at this point in the history
  • Loading branch information
guicaulada committed Aug 25, 2023
1 parent a12c0b8 commit 36af867
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions containers/npm_publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ import (
// PublishNPM publishes a npm package to the given destination.
func PublishNPM(ctx context.Context, d *dagger.Client, pkg *dagger.File, opts *NPMOpts) (string, error) {
src := ExtractedArchive(d, pkg, "pkg.tgz")

version, err := GetJSONValue(ctx, d, src, "package.json", "version")
if err != nil {
return "", err
}

name, err := GetJSONValue(ctx, d, src, "package.json", "name")
if err != nil {
return "", err
}

isLatestStable, err := IsLatestGrafana(ctx, d, executil.Stable, version)
if err != nil {
Expand Down

0 comments on commit 36af867

Please sign in to comment.