mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 17:49:01 +08:00
Do not redirect stdout and stderr for CLI
CURA-6549
This commit is contained in:
parent
81919b75df
commit
280ddea1ae
@ -32,7 +32,8 @@ if not known_args["debug"]:
|
||||
elif Platform.isOSX():
|
||||
return os.path.expanduser("~/Library/Logs/" + CuraAppName)
|
||||
|
||||
if hasattr(sys, "frozen"):
|
||||
# Do not redirect stdout and stderr to files if we are running CLI.
|
||||
if hasattr(sys, "frozen") and "cli" in os.path.basename(sys.argv[0]).lower():
|
||||
dirpath = get_cura_dir_path()
|
||||
os.makedirs(dirpath, exist_ok = True)
|
||||
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w", encoding = "utf-8")
|
||||
|
Loading…
x
Reference in New Issue
Block a user