yas
yas copied to clipboard
Use stdin/stdout on Windows when possible instead of creating a new Console window
Currently, yas opens a new cmd.exe-like console window/buffer even if being executed inside a terminal like Window Terminal. This causes a few issues:
- Executing
yas.exe --helponly prints the help message onto the newly created window, which then immediately closes afteryas.exeexits, leaving the user with no help messages whatsoever. - Essentially the same issue as 1. when your supply
yaswith incorrect CLI arguments: no message is delivered. - The console window does not support copying.
Proposed solution:
Print to stdout by default. Only open a console when you're sure that the program is not already in a terminal.
没复现

Running yas inside a shell that's being run at administrator's privilege does solve this issue. Though I think yas should work inside an unprivileged shell as well.
This and https://github.com/wormtql/yas/issues/100 are possibly two sides of the same coin.