diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-01-15 00:14:05 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-01-15 01:45:14 +0530 |
commit | 04e275cdcc99095c9a71b1ce0d3d7d3f3124409c (patch) | |
tree | d356a5fc4e4f88e5b1b864a46c05557281ea6986 /run_unittests.py | |
parent | c7cc7341322f23b8bad801c09328efd32f586387 (diff) | |
download | meson-04e275cdcc99095c9a71b1ce0d3d7d3f3124409c.zip meson-04e275cdcc99095c9a71b1ce0d3d7d3f3124409c.tar.gz meson-04e275cdcc99095c9a71b1ce0d3d7d3f3124409c.tar.bz2 |
find_program: Always use USERPROFILE instead of HOME
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 898f05e..bd7266a 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): ''' |