Skip to content

Commit b2dfc8e

Browse files
timvwclaude
andcommitted
fix: convert shellenv array to string for PowerShell Invoke-Expression
The issue was that PowerShell's & operator returns an array of output lines, but Invoke-Expression requires a single string. Error: 'Cannot convert System.Object[] to the type System.String required by parameter Command' Fix: Use -join "`n" to convert the array to a newline-delimited string. This allows Invoke-Expression to properly evaluate the shellenv output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 25f1e8f commit b2dfc8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ jobs:
464464
465465
# Load shellenv
466466
$env:WORKTREE_ROOT = $WORKTREE_ROOT
467-
Invoke-Expression (& $WT_BIN shellenv)
467+
Invoke-Expression ((& $WT_BIN shellenv) -join "`n")
468468
469469
# Test checkout
470470
Write-Output "Testing: wt checkout test-branch"

0 commit comments

Comments
 (0)