I also intend to rewrite fileio.cpp for Win32 that doesn't use POSIX API calls and supports UTF-8, in a different pr.
show_message(execute_shell_for_output('cmd /c dir c:\'));
@JoshDreamland ready for review.
❗No coverage uploaded for pull request base (
master@0da40cf). Click here to learn what that means.
The diff coverage is
@@ Coverage Diff @@ ## master #1811 +/- ## ========================================= Coverage ? 25.15% ========================================= Files ? 177 Lines ? 16844 Branches ? 0 ========================================= Hits ? 4237 Misses ? 12607 Partials ? 0
@JoshDreamland Note for review: the Posix version of execute_shell_for_output() will always return a new line at the end of the string no matter what. To adopt the same behavior, I did the Windows equivalent by checking the function for failure scenarios, and under those conditions, return a carriage return and new line instead of an empty string, so that new line will always be at the end of the string regardless, just as the Posix function does, (however there are no conditions the Posix function will fail, as even an invalid argument specified will output a lone new line character for the return string). I just wanted to explain why I did that; no reason other than consistency.
@JoshDreamland Now passing! Review when you can and thank you! :D
Please sign in to post comments, or you can view this issue on GitHub.