Browse Source

Merge pull request #1688 from Avaiga/fix/#1687-first-cli-option-is-skipped-if-before-positional-arg

Fix/#1687 - First cli option is skipped if it's before the positional arg
Đỗ Trường Giang 9 months ago
parent
commit
06b0a2fa4b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      taipy/_cli/_run_cli.py

+ 3 - 1
taipy/_cli/_run_cli.py

@@ -41,7 +41,9 @@ class _RunCLI(_AbstractCLI):
         if getattr(args, "which", None) != "run":
             return
 
-        all_args = sys.argv[3:]  # First 3 args are always (1) Python executable, (2) run, (3) Python file
+        # First 2 args are always (1) Python executable, (2) run
+        # Unknown args are passed when running the application but will be ignored
+        all_args = sys.argv[2:]
 
         external_args = []
         try: