Skip to content

Commit 6bf2b0b

Browse files
authored
Merge pull request #964 from spacewander/bro
git-browse/browse-ci: use powershell.exe only when it is available
2 parents 716459f + d17f029 commit 6bf2b0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/git-browse

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ case "$OSTYPE" in
4040
;;
4141
linux*)
4242
# Handle WSL on Windows
43-
if uname -a | grep -i -q Microsoft
43+
if uname -a | grep -i -q Microsoft && command -v powershell.exe
4444
then
4545
powershell.exe -NoProfile start $url
4646
else

bin/git-browse-ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ case "$OSTYPE" in
5151
;;
5252
linux*)
5353
# Handle WSL on Windows
54-
if uname -a | grep -i -q Microsoft
54+
if uname -a | grep -i -q Microsoft && command -v powershell.exe
5555
then
5656
powershell.exe -NoProfile start "${ci_url}"
5757
else

0 commit comments

Comments
 (0)