Check for embedded @OUTPUT@s in commands.

This commit is contained in:
Jussi Pakkanen 2016-08-27 14:41:14 +03:00
parent ae12656555
commit 7cd6206d9a
1 changed files with 4 additions and 3 deletions

View File

@ -1015,9 +1015,10 @@ class CustomTarget:
else:
raise InvalidArguments('Argument %s in "command" is invalid.' % i)
self.command = final_cmd
if self.capture and '@OUTPUT@' in self.command:
raise InvalidArguments(
'@OUTPUT@ is not allowed when capturing output.')
if self.capture:
for c in self.command:
if isinstance(c, str) and '@OUTPUT@' in c:
raise InvalidArguments('@OUTPUT@ is not allowed when capturing output.')
if 'install' in kwargs:
self.install = kwargs['install']
if not isinstance(self.install, bool):