Let's properly distinguish temporary files from workspace files by
putting the temporary files in a subdirectory of the workspace.
options=["--bind", config.workspace_dir_or_default(), config.workspace_dir_or_default()],
)
stack.callback(lambda: rmtree(workspace, sandbox=sandbox))
+ (workspace / "tmp").mkdir(mode=0o1777)
- with scopedenv({"TMPDIR" : os.fspath(workspace)}):
+ with scopedenv({"TMPDIR" : os.fspath(workspace / "tmp")}):
try:
yield Path(workspace)
except BaseException: