-
-
Notifications
You must be signed in to change notification settings - Fork 4
Fix PowerShell test failures and enable cross-platform testing #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Change Write-Host to Write-Output for help text capture - Make Resolve-MountPath platform-aware (Windows/Linux) - Make tests platform-aware for path testing - Remove DryRun parameter test (feature doesn't exist) Co-authored-by: Gordon Beeming <me@gordonbeeming.com> Co-authored-by: GordonBeeming <5680199+GordonBeeming@users.noreply.github.com>
|
@copilot There are some tests that were only running on windows and not linux/mac... With the changes made can those now run everywhere? |
With the platform-aware fixes, test_powershell.ps1 now works on all platforms, not just Windows. Updated run_all_tests.sh to run these tests on Linux/macOS too. Co-authored-by: Gordon Beeming <me@gordonbeeming.com> Co-authored-by: GordonBeeming <5680199+GordonBeeming@users.noreply.github.com>
Yes! The platform-aware changes now allow I updated
All PowerShell integration tests pass on Linux with the platform-aware path handling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances the PowerShell script to support cross-platform execution (Windows, Linux, macOS) by making the path handling logic platform-aware and updating the test suite to run on all platforms.
Key Changes
- Cross-platform path handling: The
Resolve-MountPathfunction now detects the operating system and normalizes path separators accordingly (backslashes for Windows, forward slashes for Linux/macOS) - Home directory expansion: Updated to support both
$env:USERPROFILE(Windows) and$env:HOME(Linux/macOS) - Test improvements: PowerShell tests now run on all platforms with platform-specific absolute path validation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| copilot_here.ps1 | Added cross-platform path normalization using OS detection, updated home directory expansion for both Windows and Linux, changed help output from Write-Host to Write-Output |
| tests/integration/test_powershell.ps1 | Added platform-specific absolute path tests using OS detection, removed obsolete DryRun parameter test |
| tests/run_all_tests.sh | Removed Windows-only restriction for PowerShell tests, enabling cross-platform test execution |
PowerShell integration tests were failing due to help output not being captured and path separator mismatches between Windows/Linux test environments.
Changes
Help Output Capture
Write-Host→Write-Outputin help sections2>&1 | Out-StringredirectionPlatform-Aware Path Resolution
Resolve-MountPathto detect OS and use appropriate path separators:$env:USERPROFILE$env:HOMETest Updates
-DryRunparameterCross-Platform Test Enablement
tests/run_all_tests.shto run PowerShell integration tests on Linux/macOSTesting
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.