diff --git a/cgmanifests/submodules/generate_submodule_cgmanifest.py b/cgmanifests/submodules/generate_submodule_cgmanifest.py index 2f089e27d8..eca0a85cc7 100644 --- a/cgmanifests/submodules/generate_submodule_cgmanifest.py +++ b/cgmanifests/submodules/generate_submodule_cgmanifest.py @@ -61,10 +61,13 @@ with open(os.path.join(REPO_DIR, 'tools', 'ci_build', 'github', 'linux', 'docker package_filename = None package_url = None +def normalize_path_separators(path): + return path.replace(os.path.sep, "/") proc = subprocess.run( ["git", "submodule", "foreach", "--quiet", "--recursive", "{} {} $toplevel/$sm_path".format( - sys.executable, os.path.join(SCRIPT_DIR, "print_submodule_info.py"))], + normalize_path_separators(sys.executable), + normalize_path_separators(os.path.join(SCRIPT_DIR, "print_submodule_info.py")))], check=True, cwd=REPO_DIR, stdout=subprocess.PIPE, @@ -82,7 +85,8 @@ for submodule_line in submodule_lines: "commitHash": commit, "repositoryUrl": url, }, - "comments": "git submodule at {}".format(os.path.relpath(absolute_path, REPO_DIR)) + "comments": "git submodule at {}".format( + normalize_path_separators(os.path.relpath(absolute_path, REPO_DIR))) } } registrations.append(registration)