Skip to content

Create the task.dir before evaluating ShVars.#2813

Open
trulede wants to merge 1 commit intogo-task:mainfrom
trulede:PR/task-dir-sh
Open

Create the task.dir before evaluating ShVars.#2813
trulede wants to merge 1 commit intogo-task:mainfrom
trulede:PR/task-dir-sh

Conversation

@trulede
Copy link
Copy Markdown
Contributor

@trulede trulede commented Apr 26, 2026

In some limited cases a ShVar may run commands which require the configured (not default) Task Dir to be created. This is especially the case if the ShVar attempts to access the parent folder of a Task with a configured Dir.

An attempt is made to create the Task Dir before the Task is compiled via CompiledTask(). If this fails (i.e. Task Dir depends on a templated ShVar value) then the Task Dir will be created later, after the Task is compiled. The edge case that remains is not addressed by this PR.

The testcase includes an example.

Fixes #1001
Alternative to #2800

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.

dir does not create a directory in some cases

1 participant