Add support for no-value args in builder.

- currently can not support args such as --my-arg in builders
  without having to specify --builder-arg myarg=
This commit is contained in:
Michael Stead 2012-03-13 16:52:44 -03:00
parent b3cedfd10f
commit 483dbafc6b

View file

@ -411,12 +411,13 @@ class BuildModule(BaseCliModule):
if self.options.builder_args is None: if self.options.builder_args is None:
return args return args
try: for arg in self.options.builder_args:
for pair in self.options.builder_args: if '=' in arg:
key, value = pair.split("=") key, value = arg.split("=")
args[key] = value args[key] = value
except ValueError: else:
error_out("Error parsing a --builder-arg, be sure to use key=value") # Allow no value args such as 'myscript --auto'
args[arg] = ''
return args return args