Fix environmental variable check on Windows

This commit is contained in:
Riley Housden 2022-02-08 07:04:43 -05:00
parent c5f7ea8e56
commit 58852ca83c
2 changed files with 6 additions and 2 deletions

View file

@ -25,6 +25,9 @@ append_path("~/.local/bin")
append_path("~/bin")
append_path("~/go/bin")
if in_win():
append_path("F:/programs/installed/micro")
# tmux
try:
requires("tmux")
@ -42,4 +45,4 @@ $LESS_TERMCAP_me = "\033[0m" # end mode
$LESS_TERMCAP_so = "\033[01;44;36m" # begin standout-mode (bottom of screen)
$LESS_TERMCAP_se = "\033[0m" # end standout-mode
load_aliases()
load_aliases()

View file

@ -12,7 +12,8 @@ def in_wsl() -> bool:
def in_win() -> bool:
"""Determines if the system is running inside a Windows environment."""
if ${'OS'} == "Windows_NT":
import os
if 'OS' in os.environ and os.environ['OS'] == "Windows_NT":
return True
return False