Skip to content

fix: make test-cov use shell-safe Windows venv path#1236

Merged
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
sundaram2021:fix/make-cov-on-windows
May 4, 2026
Merged

fix: make test-cov use shell-safe Windows venv path#1236
muddlebee merged 1 commit intoTracer-Cloud:mainfrom
sundaram2021:fix/make-cov-on-windows

Conversation

@sundaram2021
Copy link
Copy Markdown
Contributor

hotfix

Describe the changes you have made in this PR -

Updated the Windows virtualenv Python/PIP paths in the Makefile to use forward slashes instead of escaped backslashes.

This prevents Unix-like shells such as Git Bash/MSYS /usr/bin/sh from interpreting backslashes as escape characters and mangling .venv\Scripts\python.exe into .venvScriptspython.exe.

before:

.venv\\Scripts\\python.exe -m pytest -n auto -v --cov=app --cov-report=term-missing --ignore=tests/e2e/kubernetes_local_alert_simulation --ignore=tests/synthetic -m "not synthetic"
/usr/bin/sh: line 1: .venvScriptspython.exe: command not found
make: *** [test-cov] Error 127

after : ran successfully

Dry-run verification:

make -n test-cov
.venv/Scripts/python.exe -m pytest -n auto -v --cov=app --cov-report=term-missing --ignore=tests/e2e/kubernetes_local_alert_simulation --ignore=tests/synthetic -m "not synthetic"

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR fixes the Windows virtualenv path variables in the Makefile by replacing double backslashes (\\) with forward slashes (/) for the PYTHON and PIP variables in the Windows_NT branch. The double backslashes were being collapsed by Git Bash/MSYS's /usr/bin/sh into a single backslash, which was then stripped as an escape character, turning .venv\Scripts\python.exe into the non-existent command .venvScriptspython.exe.

Confidence Score: 5/5

This PR is safe to merge — the change is minimal, correct, and well-scoped to the broken Windows path.

The two-line change replaces syntactically broken double-backslash paths with forward slashes, which are valid on Windows and already used consistently elsewhere in the same Makefile (wildcard check on line 11, PATH export on line 29). No logic, tests, or other files are affected.

No files require special attention.

Important Files Changed

Filename Overview
Makefile Replaces double backslashes with forward slashes for Windows venv Python/PIP paths — a correct and minimal fix that aligns with the existing wildcard check on line 11 which already uses forward slashes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Start: Resolve PYTHON and PIP] --> B{".venv/bin/python exists?"}
    B -- Yes --> C["PYTHON = .venv/bin/python\nPIP = .venv/bin/python -m pip"]
    B -- No --> D{"OS == Windows_NT?"}
    D -- Yes --> E{".venv/Scripts/python.exe exists?"}
    E -- Yes --> F["PYTHON = .venv/Scripts/python.exe\nPIP = .venv/Scripts/python.exe -m pip\n✅ Fixed: forward slashes"]
    E -- No --> G["PYTHON = python\nPIP = python -m pip"]
    D -- No --> H{"python3 available?"}
    H -- Yes --> I["PYTHON = python3\nPIP = python3 -m pip"]
    H -- No --> J["PYTHON = python\nPIP = python -m pip"]
Loading

Reviews (1): Last reviewed commit: "fix: make test-cov use shell-safe Window..." | Re-trigger Greptile

@muddlebee
Copy link
Copy Markdown
Collaborator

just ran a quick check

image

@muddlebee muddlebee merged commit 4374977 into Tracer-Cloud:main May 4, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🎯 Bullseye. @sundaram2021 opened a PR, kept the vibes clean, and got it merged. Absolute cinema. 🎬


👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants