Skip to content

Conversation

@tonistiigi
Copy link
Member

fix #3117

Avoiding creating temp dir for stdin can be done in a follow-up.

@thaJeztah
Copy link
Member

Avoiding creating temp dir for stdin can be done in a follow-up.

Thanks for looking into this! Should we keep the ticket open until that part is addressed? (I haven't dug into the code yet to see where those are created; is that something I could look into? Not sure if it's complicated).

Comment on lines -208 to -215
defers := make([]func(), 0, 2)
defer func() {
if err != nil {
for _, f := range defers {
f()
}
}
}()
Copy link
Member

Choose a reason for hiding this comment

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

Curious if this approach (collect the release functions and a single defer would still be preferred, but possibly without the if err != nil ? I know some linters will complain about the defer release() in a loop.

build/build.go Outdated
}
addGitAttrs(so)
defers = append(defers, release)
defer release()
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be moved right before saveLocalState

@crazy-max crazy-max merged commit 9730a20 into docker:master Apr 22, 2025
138 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants