diff options
author | Scott Wittenburg <scott.wittenburg@kitware.com> | 2024-05-20 18:56:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 00:56:48 +0000 |
commit | 29d4a5af44b09ef23e866d38e8015400ea1d7fd9 (patch) | |
tree | 9d925d4de2acea05a5149d030a5f4ed1e7d16d40 /lib | |
parent | dd9b7ed6a7cb8eb4e4f65a5b9aaec68791f44503 (diff) | |
download | spack-29d4a5af44b09ef23e866d38e8015400ea1d7fd9.tar.gz spack-29d4a5af44b09ef23e866d38e8015400ea1d7fd9.tar.bz2 spack-29d4a5af44b09ef23e866d38e8015400ea1d7fd9.tar.xz spack-29d4a5af44b09ef23e866d38e8015400ea1d7fd9.zip |
gitlab ci: fix untouched spec pruning on windows (#44279)
Use correct path separator in get_all_package_diffs for all platforms.
Ensures correct package change computation on Windows when pruning unchanged specs in Gitlab CI
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/repo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 9b6f104fe5..743f5a18e8 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -241,7 +241,7 @@ def get_all_package_diffs(type, rev1="HEAD^1", rev2="HEAD"): Arguments: - type (str): String containing one or more of 'A', 'B', 'C' + type (str): String containing one or more of 'A', 'R', 'C' rev1 (str): Revision to compare against, default is 'HEAD^' rev2 (str): Revision to compare to rev1, default is 'HEAD' @@ -264,7 +264,7 @@ def get_all_package_diffs(type, rev1="HEAD^1", rev2="HEAD"): lines = [] if not out else re.split(r"\s+", out) changed = set() for path in lines: - pkg_name, _, _ = path.partition(os.sep) + pkg_name, _, _ = path.partition("/") if pkg_name not in added and pkg_name not in removed: changed.add(pkg_name) |