diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-01-15 00:14:05 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-01-15 00:14:05 +0530 |
commit | 3b32cc802bd92fe04f6443f3d065d23a7f497265 (patch) | |
tree | 38c19026801c1a1c9a4c5fcc32aa08307327f733 /run_unittests.py | |
parent | 4e41acb0224d851f2fc4610d7c8a84c5d6c88a9e (diff) | |
download | meson-fix-windowsapps-msys.tar.gz |
find_program: Always use USERPROFILE instead of HOMEfix-windowsapps-msys
On MSYS2 and MSYS, Python reads HOME instead of USERPROFILE, which
gets the path wrong.
Serves me right for not writing a test!!
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 898f05e54..bd7266aba 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4542,6 +4542,14 @@ class WindowsTests(BasePlatformTests): self.assertTrue(prog.found(), msg='test-script-ext.py not found in PATH') self.assertPathEqual(prog.get_command()[0], python_command[0]) self.assertPathBasenameEqual(prog.get_path(), 'test-script-ext.py') + # Ensure that WindowsApps gets removed from PATH + path = os.environ['PATH'] + if 'WindowsApps' not in path: + username = os.environ['USERNAME'] + appstore_dir = r'C:\Users\{}\AppData\Local\Microsoft\WindowsApps'.format(username) + path = os.pathsep + appstore_dir + path = ExternalProgram._windows_sanitize_path(path) + self.assertNotIn('WindowsApps', path) def test_ignore_libs(self): ''' |