mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22: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:
|
||||
return args
|
||||
|
||||
try:
|
||||
for pair in self.options.builder_args:
|
||||
key, value = pair.split("=")
|
||||
for arg in self.options.builder_args:
|
||||
if '=' in arg:
|
||||
key, value = arg.split("=")
|
||||
args[key] = value
|
||||
except ValueError:
|
||||
error_out("Error parsing a --builder-arg, be sure to use key=value")
|
||||
else:
|
||||
# Allow no value args such as 'myscript --auto'
|
||||
args[arg] = ''
|
||||
return args
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue