Respect direct input path arguments
This commit is contained in:
+6
-3
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user