Skip to content

State info can handle versions#1201

Merged
MDrakos merged 5 commits into
masterfrom
info-versions-176192863
Jan 8, 2021
Merged

State info can handle versions#1201
MDrakos merged 5 commits into
masterfrom
info-versions-176192863

Conversation

@MDrakos

@MDrakos MDrakos commented Jan 8, 2021

Copy link
Copy Markdown
Member

@MDrakos MDrakos requested a review from Naatan January 8, 2021 19:37

@Naatan Naatan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just some minor stuff.

Comment thread internal/runners/packages/info.go Outdated
if version != "" {
ingredientVersion, err = specificIngredientVersion(pkg.Ingredient.IngredientID, version)
if err != nil {
return locale.NewInputError("info_err_version_not_found", "Could not find version {{.V0}} for package {{.V1}}", version, pkgName)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be wrapping the error

Comment thread internal/runners/packages/info.go Outdated
}

for _, iv := range ingredientVersions {
if *iv.Version == version {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a nil check

Comment thread internal/runners/packages/info.go Outdated
}
}

return nil, locale.NewError("err_no_ingredient_version_found", "No ingredient version found")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be a input error

@MDrakos MDrakos merged commit 478b405 into master Jan 8, 2021
@MDrakos MDrakos deleted the info-versions-176192863 branch January 8, 2021 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants