[OS] Add functions to determine standard I/O device type.#91201
[OS] Add functions to determine standard I/O device type.#91201Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
Note that unlike the regex, this approach will not work with manually inserted ANSI escape sequences in |
In this case, adding regex will not be straightforward. StdLogger is created before ClassDB init, and RegEx class can't be created before it's registered in ClassDB. |
f0c9469 to
c9a0a7c
Compare
There was a problem hiding this comment.
Should we also support -console.exe?
There was a problem hiding this comment.
It's not supported by wrapper, be I guess could be added.
godot/platform/windows/console_wrapper_windows.cpp
Lines 74 to 80 in b00e1cb
Calinou
left a comment
There was a problem hiding this comment.
Tested locally, it works as expected.
Test 1
bin/godot.linuxbsd.editor.x86_64 --path ~/Documents/Godot/test_pr_91201 < out.txt > out2.txt
Test 2
bin/godot.linuxbsd.editor.x86_64 --path ~/Documents/Godot/test_pr_91201 < out.txt &> out3.txt
Test 3
bin/godot.linuxbsd.editor.x86_64 --path ~/Documents/Godot/test_pr_91201 < out.txt
|
Thanks! |



stdinreads when not using wrapper (will return "invalid" type).stdioread method.stdinas raw data instead of UTF-8 encoded string.Required to filter escape sequences for the redirected streams (a filter similar to #90900, or probably can be filtered directly in the
rich_printto avoid extra regex, will add it later as a separate PR).Production edit (keywords for easier searching): TTY, CLI, terminal