From 6cb3721bc4cecf39d3ea49d67afb41e971215dc2 Mon Sep 17 00:00:00 2001
From: Davide Gardenal <davide.gardenal@huawei.com>
Date: Wed, 27 Jul 2022 07:29:47 +0200
Subject: [PATCH] upgrade_oniro: convert required options

Convert required options to positional arguments.
Required options are not a good idea because it can be
confusing for the user have an option (that should be
optional) required for running the script.

Signed-off-by: Davide Gardenal <davide.gardenal@huawei.com>
---
 scripts/upgrade_oniro/upgrade_oniro.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/upgrade_oniro/upgrade_oniro.py b/scripts/upgrade_oniro/upgrade_oniro.py
index ac7604dd..41cb1f69 100644
--- a/scripts/upgrade_oniro/upgrade_oniro.py
+++ b/scripts/upgrade_oniro/upgrade_oniro.py
@@ -59,9 +59,9 @@ def init_script_options():
     parser = argparse.ArgumentParser(description=script_description)
 
     # TODO a choice could be added in the version by checking all the tags of Oniro
-    parser.add_argument("-tv", "--target-version", type=str, required=True,
+    parser.add_argument("target-version", type=str,
                         help="Specify the target version of Oniro you want to upgrade to")
-    parser.add_argument("-d", "--build-directory", type=pathlib.Path, required=True,
+    parser.add_argument("build-directory", type=pathlib.Path,
                         help="Path to the build directory you want to use (can be non-existent)")
     # TODO a choice could be added in the machine
     parser.add_argument("-m", "--machine", type=str, default="qemux86-64",
-- 
GitLab