Respect direct input path arguments

This commit is contained in:
Melbar
2026-05-07 18:15:27 +02:00
parent 9c4fd4d6ef
commit 5d71c81f22
2 changed files with 12 additions and 3 deletions
+6 -3
View File
@@ -525,9 +525,6 @@ def run_cli(input_file: str, output_dir: str = OUTPUT_BASE_DIR) -> int:
except Exception as exc:
print(f"\nFEHLER: {exc}")
return 1
finally:
if sys.stdin.isatty():
os.system("pause")
class MezzanineApp:
@@ -762,6 +759,12 @@ Write-Output $open.FileName
def main() -> int:
if len(sys.argv) > 2 and sys.argv[1] == "--cli":
return run_cli(sys.argv[2], OUTPUT_BASE_DIR)
if len(sys.argv) > 1:
input_file = sys.argv[1]
if not os.path.isfile(input_file):
print(f"FEHLER: Eingabedatei nicht gefunden: {input_file}")
return 1
return run_cli(input_file, OUTPUT_BASE_DIR)
return run_ui()