Correctly set the environment.

When running command without `shell=True`, python's subproccess will look
for variable `"PATH"` and `b"PATH"` and will complain if both are set.
So the defaultdict should not return something for `b"PATH"`.

We also escape space ` ` in the environment variables to not break
everything with directory containing space.
This commit is contained in:
Matthieu Gautier
2018-06-19 10:55:00 +02:00
parent 738bfa6744
commit e87835c61d
4 changed files with 41 additions and 15 deletions

View File

@ -3,7 +3,7 @@ import os
import shutil
import time
from kiwixbuild.utils import pj, Context, SkipCommand, WarningMessage, extract_archive, Defaultdict, StopBuild, run_command, colorize, copy_tree
from kiwixbuild.utils import pj, Context, SkipCommand, WarningMessage, extract_archive, StopBuild, run_command, colorize, copy_tree
from kiwixbuild.versions import main_project_versions, base_deps_versions
from kiwixbuild._global import neutralEnv, option, get_target_step