Skip to content

Commit 2492b8a

Browse files
committed
Set Windows default path
1 parent f41557c commit 2492b8a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

gtm-plugin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
def find_gtm_path():
99
if sys.platform == 'win32':
1010
exe = 'gtm.exe'
11-
default_path = ""
1211
path_sep = ";"
12+
pf = os.path.join(os.environ.get("ProgramFiles", ""), "gtm", "bin")
13+
pfx86 = os.path.join(os.environ.get("ProgramFiles(x86)", ""), "gtm", "bin")
14+
default_path = pf + path_sep + pfx86
1315
else:
1416
exe = 'gtm'
15-
default_path = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/"
1617
path_sep = ":"
18+
default_path = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/"
1719

1820
env_path = set(os.environ['PATH'].split(path_sep))
1921
paths = env_path.union(set(default_path.split(path_sep)))

0 commit comments

Comments
 (0)