Be sure that the cwd exists before running the command.

This commit is contained in:
Matthieu Gautier 2017-01-09 11:36:23 +01:00
parent edecfb34f9
commit 7cb8207e11
1 changed files with 1 additions and 0 deletions

View File

@ -163,6 +163,7 @@ class BuildEnv:
return n return n
def run_command(self, command, cwd, context, env=None, input=None): def run_command(self, command, cwd, context, env=None, input=None):
os.makedirs(cwd, exist_ok=True)
with open(context.log_file, 'w') as log: with open(context.log_file, 'w') as log:
log.write("run command '{}'\n".format(command)) log.write("run command '{}'\n".format(command))
if env: if env: