Files
MINGW-packages/mingw-w64-github-cli/gh
Johannes Schindelin 4cfaa7f6ae gh: allow running in WSL
In WSL, we do not have `/usr/bin/winpty`. Let's verify that it is
available before using it, falling back to the `winpty`-less invocation.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-04-15 10:53:49 +02:00

9 lines
175 B
Bash

#!/usr/bin/env bash
GH_EXE="$( dirname ${BASH_SOURCE[0]} )/gh.exe"
if [ -t 0 -a -t 1 -a -x /usr/bin/winpty ]; then
/usr/bin/winpty $GH_EXE "$@"
else
exec $GH_EXE "$@"
fi