summaryrefslogtreecommitdiffstats
path: root/SCons/Script
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-11-26 22:17:13 (GMT)
committerGitHub <noreply@github.com>2021-11-26 22:17:13 (GMT)
commit32f7dc39cd6720b50f92955170327a800aefb454 (patch)
treee89574a1696fc27ac03becb8b922140771f86427 /SCons/Script
parentc15eee22115ba69643f1bd4d136d982ef349ad05 (diff)
parent9ca9d4480892c45827b5719163675eb7bde1e071 (diff)
downloadSCons-32f7dc39cd6720b50f92955170327a800aefb454.zip
SCons-32f7dc39cd6720b50f92955170327a800aefb454.tar.gz
SCons-32f7dc39cd6720b50f92955170327a800aefb454.tar.bz2
Merge pull request #4067 from mwichmann/wintweaks
Fix tests to not hang on Windows with bad .py assoc
Diffstat (limited to 'SCons/Script')
-rw-r--r--SCons/Script/Main.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py
index 0786a38..a340f5b 100644
--- a/SCons/Script/Main.py
+++ b/SCons/Script/Main.py
@@ -790,13 +790,12 @@ def _load_all_site_scons_dirs(topdir, verbose=False):
return os.path.expanduser('~/'+d)
if platform == 'win32' or platform == 'cygwin':
- # Note we use $ here instead of %...% because older
- # pythons (prior to 2.6?) didn't expand %...% on Windows.
- # This set of dirs should work on XP, Vista, 7 and later.
sysdirs=[
- os.path.expandvars('$ALLUSERSPROFILE\\Application Data\\scons'),
- os.path.expandvars('$USERPROFILE\\Local Settings\\Application Data\\scons')]
- appdatadir = os.path.expandvars('$APPDATA\\scons')
+ os.path.expandvars('%AllUsersProfile%\\scons'),
+ # TODO older path, kept for compat
+ os.path.expandvars('%AllUsersProfile%\\Application Data\\scons'),
+ os.path.expandvars('%LocalAppData%\\scons')]
+ appdatadir = os.path.expandvars('%AppData%\\scons')
if appdatadir not in sysdirs:
sysdirs.append(appdatadir)
sysdirs.append(homedir('.scons'))