Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix env vars check for vcs details #1468

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

crazy-max
Copy link
Member

Signed-off-by: CrazyMax [email protected]

@crazy-max crazy-max added this to the v0.10.0 milestone Dec 14, 2022
@jedevc jedevc merged commit b741d26 into docker:master Dec 14, 2022
@crazy-max crazy-max deleted the fix-git-vcs-check branch December 14, 2022 13:44
setGitLabels = v
}
}
setGitInfo := true
if v, ok := os.LookupEnv("BUILDX_GIT_INFO"); ok {
if v, _ := strconv.ParseBool(v); v {
if v, err := strconv.ParseBool(v); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

If these variables are set but to an invalid value, shouldn't that error bubble up too? 😅
(strconv.ParseBool is very generous in the number of values it accepts already 😄)

Copy link
Member Author

Choose a reason for hiding this comment

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

I was not sure as we want to fail silently but makes sense as this is a user input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants