Conversation
PowerShell command output is an array of strings by default, but `Invoke-Expression` expects a single string. Without `| Out-String`, users get "Cannot convert 'System.Object[]' to the type 'System.String'". Also adds PSModulePath hint to `wt config show` diagnostics on Windows. Co-Authored-By: Claude <noreply@anthropic.com>
- Add bin_dir to PATH so `Get-Command wt` works in CI - Remove PSModulePath diagnostic to fix Windows snapshot failures Co-Authored-By: Claude <noreply@anthropic.com>
CARGO_BIN_EXE_wt is only available in integration tests, not lib tests. Move the test to tests/integration_tests/shell_powershell.rs. Co-Authored-By: Claude <noreply@anthropic.com>
875a2e8 to
70a8553
Compare
PowerShell configs without `| Out-String` are now treated as "not installed" so that `wt config shell install` will update them with the fix. Key changes: - PowerShell detection now uses case-insensitive matching - Check for Invoke-Expression/iex BEFORE POSIX patterns to avoid false match on `if ` which appears in old PowerShell configs - Add test for exact old canonical PowerShell line Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Invoke-Expressionexpects a single string| Out-Stringconverts the array to a single stringFixes #885
Test plan
test_powershell_config_line_evaluates_correctly(behindshell-integration-testsfeature)🤖 Generated with Claude Code