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

Ensure the dir we're exporting to exists #3345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tatskaari
Copy link
Member

Otherwise we get errors trying to clean out the old .plzconfig file before copying ours in.

@@ -37,6 +37,10 @@ func ToDir(state *core.BuildState, dir string, noTrim bool, targets []core.Build
exportedTargets: map[core.BuildLabel]bool{},
}

if err := os.MkdirAll(dir, fs.DirPermissions); err != nil {
log.Fatalf("failed to create export dir: %v", dir)
Copy link
Contributor

@chrisnovakovic chrisnovakovic Jan 29, 2025

Choose a reason for hiding this comment

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

Suggested change
log.Fatalf("failed to create export dir: %v", dir)
log.Fatalf("failed to create export directory %s: %v", dir, err)

Worth outputting the error too?

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