| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Reviewer's GuideAdjusts env activate to choose activation output based on detected shell instead of OS, unifies quoting/command construction across platforms (including POSIX shells on Windows), and updates/extends tests accordingly, including Windows + bash regression coverage. Updated class diagram for env activate command and environmentclassDiagram
class EnvActivateCommand {
_get_activate_command(env Env, shell str) str
_quote(activation_script Path, shell str) str
}
class Env {
bin_dir Path
}
class Path {
as_posix() str
}
EnvActivateCommand --> Env : uses
Env --> Path : bin_dir
EnvActivateCommand --> Path : uses
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commands Interacting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sorry, something went wrong.
There was a problem hiding this comment.
Please take a look at the failing tests on Windows!
I think your change may make sense in general but requires additional fixes. The returned command . for powershell and cmd makes no sense. (It was not used before your change.) It should probably be & for powershell (instead of adding & in the _quote function) and (with your change) empty for cmd.
Further, please just extend the parameterization of the existing tests instead of adding a new test if possible.
Sorry, something went wrong.
|
Thanks for the detailed review — agreed on all points. I’ll update this PR accordingly:
I’ll push a follow-up revision that addresses the Windows failures. |
Sorry, something went wrong.
|
Addressed the requested changes and pushed 5f427522. What changed:
Validation run:
|
Sorry, something went wrong.
|
Pushed another follow-up: abe08c02. Root cause of the Windows CI failures was assertion mismatch in the test expectations (actual output used single-quoted paths for pwsh/powershell/bash via shlex.quote). Updates:
Local verification:
|
Sorry, something went wrong.
|
All requested fixes are now in and CI is fully green on commit abe08c02 (including the Windows pytest matrix). Could you take another look when you have a moment? |
Sorry, something went wrong.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
Please address the comments from this code review:
## Overall Comments
- In `_get_activate_command`, relying on `f"{command} {quoted}".strip()` to handle the empty-command case is a bit opaque; consider branching explicitly on `command` (or using `" ".join(...)` with a filter) to avoid surprising trimming behavior if paths ever start/end with whitespace.
- The `_quote` helper no longer uses the `shell` parameter for non-Windows cases; consider either documenting why the shell is intentionally ignored there or simplifying the signature if shell-specific quoting is not required outside Windows.
Sorry, something went wrong.
…rShell, harmonize tests
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #10395.
Testing
Summary by Sourcery
Adjust env activate to select activation command format based on detected shell rather than host OS, with improved Windows handling and updated tests.
Bug Fixes:
Tests: