FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Detect the system when OS is Windows_NT (#7989) · coder/code-server@9d72dce · GitHub

Repository navigation

Commit 9d72dce

Browse files
authored
Detect the system when OS is Windows_NT (#7989)
Since we assume only Windows would set this value, we just run OS detection rather than trying to normalize it to `windows`.
1 parent 53692fd commit 9d72dce

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎ci/lib.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ if [[ ! ${ARCH-} ]]; then
4949
export ARCH
5050
fi
5151

52-
if [[ ! ${OS-} ]]; then
52+
# Windows predefines OS as Windows_NT for every process, so on a windows shell
53+
# the check below would always find a value and never call os(). That is not a
54+
# name this build knows, so it does not count as one the caller chose.
55+
if [[ ! ${OS-} || ${OS-} == "Windows_NT" ]]; then
5356
OS=$(os)
5457
export OS
5558
fi

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL