make named parameters mandatory
This commit is contained in:
parent
d3023ec7f7
commit
1d7f2461a0
1 changed files with 5 additions and 4 deletions
9
osbuild
9
osbuild
|
|
@ -44,10 +44,11 @@ if __name__ == "__main__":
|
|||
parser = argparse.ArgumentParser(description="Build operating system images")
|
||||
parser.add_argument("pipeline_path", metavar="PIPELINE",
|
||||
help="json file containing the pipeline that should be built")
|
||||
parser.add_argument("--input", dest="input_dir", metavar="DIRECTORY", type=os.path.abspath,
|
||||
help="provide the contents of DIRECTORY to the first stage")
|
||||
parser.add_argument("--output", dest="output_dir", metavar="DIRECTORY", type=os.path.abspath,
|
||||
help="provide the empty DIRECTORY as output argument to the last stage")
|
||||
requiredNamed = parser.add_argument_group('required named arguments')
|
||||
requiredNamed.add_argument("-i", "--input", dest="input_dir", metavar="DIRECTORY", type=os.path.abspath,
|
||||
help="provide the contents of DIRECTORY to the first stage", required=True)
|
||||
requiredNamed.add_argument("-o", "--output", dest="output_dir", metavar="DIRECTORY", type=os.path.abspath,
|
||||
help="provide the empty DIRECTORY as output argument to the last stage", required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
os.makedirs("/run/osbuild", exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue