mirror of
https://github.com/coder/code-server.git
synced 2026-09-09 11:27:24 +02:00
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`.
This commit is contained in:
@@ -49,7 +49,10 @@ if [[ ! ${ARCH-} ]]; then
|
||||
export ARCH
|
||||
fi
|
||||
|
||||
if [[ ! ${OS-} ]]; then
|
||||
# Windows predefines OS as Windows_NT for every process, so on a windows shell
|
||||
# the check below would always find a value and never call os(). That is not a
|
||||
# name this build knows, so it does not count as one the caller chose.
|
||||
if [[ ! ${OS-} || ${OS-} == "Windows_NT" ]]; then
|
||||
OS=$(os)
|
||||
export OS
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user