This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cs:usable_windows [2020/02/26 00:52] paolo_bolzoni |
cs:usable_windows [2020/04/01 05:01] (current) paolo_bolzoni little touch up in winpty |
||
---|---|---|---|
Line 36: | Line 36: | ||
Normally this is fine, but seldom it breaks programs. To disable it one needs to setup an environment variable: ''MSYS2_ARG_CONV_EXCL'' ([[https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces|Documentation]]). | Normally this is fine, but seldom it breaks programs. To disable it one needs to setup an environment variable: ''MSYS2_ARG_CONV_EXCL'' ([[https://github.com/msys2/msys2/wiki/Porting#filesystem-namespaces|Documentation]]). | ||
- | === Docker === | + | == Docker == |
A common example is docker for windows. One probably wants an alias in their ''~/.bashrc''. | A common example is docker for windows. One probably wants an alias in their ''~/.bashrc''. | ||
Line 42: | Line 42: | ||
alias docker='MSYS2_ARG_CONV_EXCL="*" docker' | alias docker='MSYS2_ARG_CONV_EXCL="*" docker' | ||
- | So that Msys2 won't mangle any path. | + | So that Msys2 won't mangle any path. |
+ | |||
+ | === TTY-sensible programs === | ||
+ | |||
+ | Few programs, like __nodejs__, have problems using Msys2. When you execute them the console seems to hang. It happens because they expect the stdout do be a TTY, in other words stdout must follow the terminal interface protocol. | ||
+ | |||
+ | The Mysys2 shell does not: | ||
+ | |||
+ | $ node -p -e 'Boolean(process.stdout.isTTY)' | ||
+ | false | ||
+ | |||
+ | Fortunately there is a solution: the program **winpty** | ||
+ | |||
+ | $ winpty node -p -e "Boolean(process.stdout.isTTY)" | ||
+ | true | ||
+ | |||
+ | Let us see in action: | ||
+ | |||
+ | $ node | ||
+ | |||
+ | Nothing happens, until you press CTRL-C stopping it. | ||
+ | |||
+ | $ winpty node | ||
+ | Welcome to Node.js v13.11.0. | ||
+ | Type ".help" for more information. | ||
+ | > | ||
+ | |||
+ | Much better! **winpty** can be installed with pacman. | ||
==== Admin access ==== | ==== Admin access ==== | ||