2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2025-01-11 02:45:18 +01:00

Fail faster on invalid install_files inputs - Issue 1639

This commit is contained in:
Thomas Nagy 2015-10-15 20:07:05 +02:00
parent b5ffe6be31
commit 0357db5156
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 6 additions and 2 deletions

View File

@ -1043,6 +1043,7 @@ class InstallContext(BuildContext):
:param postpone: execute the task immediately to perform the installation
:type postpone: bool
"""
assert(dest)
tsk = inst(env=env or self.env)
tsk.bld = self
tsk.path = cwd or self.path
@ -1079,6 +1080,7 @@ class InstallContext(BuildContext):
:param postpone: execute the task immediately to perform the installation
:type postpone: bool
"""
assert(dest)
tsk = inst(env=env or self.env)
tsk.bld = self
tsk.path = cwd or self.path
@ -1111,11 +1113,11 @@ class InstallContext(BuildContext):
:param relative_trick: make the symlink relative (default: ``False``)
:type relative_trick: bool
"""
if Utils.is_win32:
# symlinks *cannot* work on that platform
# TODO waf 1.9 - replace by install_as
return
assert(dest)
tsk = inst(env=env or self.env)
tsk.bld = self
tsk.dest = dest

View File

@ -565,6 +565,8 @@ def subst_vars(expr, params):
return params.get_flat(m.group(3))
except AttributeError:
return params[m.group(3)]
# if you get a TypeError, it means that 'expr' is not a string...
# Utils.subst_vars(None, env) will not work
return reg_subst.sub(repl_var, expr)
def destos_to_binfmt(key):