mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-24 04:32:46 +00:00
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:
parent
b3cedfd10f
commit
483dbafc6b
1 changed files with 6 additions and 5 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue