Repository navigation
Move non-Windows shell stub tests behind //go:build !windows constraint - #32
Merged
Merged
Conversation
…ild tag Co-authored-by: kriserickson <325934+kriserickson@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update explain flag and command explanations based on feedback
Move non-Windows shell stub tests behind Mar 1, 2026
//go:build !windows constraint
kriserickson
approved these changes
Mar 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Moves non-Windows-only shell stub tests behind a //go:build !windows constraint so they don’t run on Windows where the underlying functions have real implementations.
Changes:
- Removed two non-Windows stub-behavior tests from the cross-platform
internal/shell/detect_test.go. - Added
internal/shell/detect_other_test.gowith//go:build !windowscontaining those stub-behavior assertions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/shell/detect_test.go | Removes platform-specific assertions so the remaining tests are truly cross-platform. |
| internal/shell/detect_other_test.go | Adds !windows-guarded tests validating non-Windows stub behavior, matching the existing detect_other.go split. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestParentShellProcess_NonWindowsandTestPreferredPowerShell_NonWindowswere in the unguardeddetect_test.go, causing them to compile and run on Windows where those functions have real (non-stub) implementations — making the assertions incorrect on that platform.Changes
internal/shell/detect_other_test.go(//go:build !windows): houses the two tests that assert stub behavior (parentShellProcess() == "",preferredPowerShell() == "powershell"), mirroring the existingdetect_other.go/detect_windows.gosplit.internal/shell/detect_test.go: removed the two relocated tests, leaving only truly cross-platform tests.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.