Merge pull request #964 from spacewander/bro

git-browse/browse-ci: use powershell.exe only when it is available
This commit is contained in:
罗泽轩 2022-04-22 16:05:26 +08:00 committed by GitHub
commit 6bf2b0bc4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ case "$OSTYPE" in
;;
linux*)
# Handle WSL on Windows
if uname -a | grep -i -q Microsoft
if uname -a | grep -i -q Microsoft && command -v powershell.exe
then
powershell.exe -NoProfile start $url
else

View file

@ -51,7 +51,7 @@ case "$OSTYPE" in
;;
linux*)
# Handle WSL on Windows
if uname -a | grep -i -q Microsoft
if uname -a | grep -i -q Microsoft && command -v powershell.exe
then
powershell.exe -NoProfile start "${ci_url}"
else