зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823058 - Fix WindowsPath related TypeErrors from mach build. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D172889
This commit is contained in:
Родитель
b7353a6c87
Коммит
104b25016c
|
@ -20,12 +20,12 @@ def action(fh, script, target_dir, *args):
|
|||
topsrcdir = Path(buildconfig.topsrcdir)
|
||||
|
||||
def make_absolute(base_path, p):
|
||||
return base_path / p[1:] if p.startswith("/") else base_path / p
|
||||
return Path(base_path) / Path(p.lstrip("/"))
|
||||
|
||||
try:
|
||||
abs_target_dir = make_absolute(objdir, target_dir)
|
||||
abs_target_dir = str(make_absolute(objdir, target_dir))
|
||||
abs_script = make_absolute(topsrcdir, script)
|
||||
script = [abs_script]
|
||||
script = [str(abs_script)]
|
||||
if abs_script.suffix == ".py":
|
||||
script = [sys.executable] + script
|
||||
subprocess.check_call(script + args, cwd=abs_target_dir)
|
||||
|
|
Загрузка…
Ссылка в новой задаче