From fd59d3e5892250b5be9292d81a591811523e9c3d Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:14:16 -0500 Subject: [PATCH] Ci: ensure file path comparsion uses posix paths (#47033) Git always produces posix paths, ensure we're always comparsing apples to apples by normalizing paths compared to git output to posix. --- lib/spack/spack/ci/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/ci/__init__.py b/lib/spack/spack/ci/__init__.py index faeb66965d9..83505e967f9 100644 --- a/lib/spack/spack/ci/__init__.py +++ b/lib/spack/spack/ci/__init__.py @@ -16,6 +16,7 @@ from typing import Callable, Dict, List, Set from urllib.request import Request +import llnl.path import llnl.util.filesystem as fs import llnl.util.tty as tty from llnl.util.tty.color import cescape, colorize @@ -83,6 +84,9 @@ def get_stack_changed(env_path, rev1="HEAD^", rev2="HEAD"): whether or not the stack was changed. Returns True if the environment manifest changed between the provided revisions (or additionally if the `.gitlab-ci.yml` file itself changed). Returns False otherwise.""" + # git returns posix paths always, normalize input to be comptaible + # with that + env_path = llnl.path.convert_to_posix_path(env_path) git = spack.util.git.git() if git: with fs.working_dir(spack.paths.prefix):