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

Create directory before evaluating dynamic arguments #1848

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

404Wolf
Copy link

@404Wolf 404Wolf commented Sep 30, 2024

Create the task's directory before evaluating dynamic arguments, so that they can use the directory if they need to.

I'm new here and to this repo, so hopefully I conformed to the guidelines, but if not let me know!

Fix for #1841

Wolf Mermelstein added 3 commits September 30, 2024 17:51
Add test for when there is a dynamic variable that relies on the
existence of a directory that go task creates.
if err := e.mkdir(t); err != nil {
e.Logger.Errf(logger.Red, "task: cannot make directory %q: %v\n", t.Dir, err)
}

Copy link

Choose a reason for hiding this comment

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

The code placed here means that directories are created before any checks that might prevent a task from running.

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.

2 participants