Skip to content

Commit 8bb3928

Browse files
timvwclaude
andcommitted
fix: use actual test repo name in Windows e2e expected paths
The test was creating test-repo-RANDOM but expecting hardcoded 'test-repo'. Now captures actual directory name and uses it in all expected path checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent aa6704a commit 8bb3928

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ jobs:
447447
$ISOLATED_HOME = New-Item -ItemType Directory -Path (Join-Path $env:TEMP ("test-home-" + (Get-Random)))
448448
$WORKTREE_ROOT = Join-Path $env:TEMP ("worktrees-" + (Get-Random))
449449
$TEST_REPO = New-Item -ItemType Directory -Path (Join-Path $env:TEMP ("test-repo-" + (Get-Random)))
450+
$TEST_REPO_NAME = Split-Path -Leaf $TEST_REPO
450451
451452
try {
452453
# Create test git repo
@@ -475,7 +476,7 @@ jobs:
475476
wt checkout test-branch
476477
477478
$CURRENT_DIR = (Get-Location).Path
478-
$EXPECTED_DIR = Join-Path $WORKTREE_ROOT "test-repo\test-branch"
479+
$EXPECTED_DIR = Join-Path $WORKTREE_ROOT "$TEST_REPO_NAME\test-branch"
479480
if ($CURRENT_DIR -ne $EXPECTED_DIR) {
480481
Write-Error "ERROR: Auto-cd failed. Expected: $EXPECTED_DIR, Got: $CURRENT_DIR"
481482
exit 1
@@ -497,7 +498,7 @@ jobs:
497498
Write-Output "Testing: wt create feature-test"
498499
wt create feature-test
499500
$CURRENT_DIR = (Get-Location).Path
500-
$EXPECTED_DIR = Join-Path $WORKTREE_ROOT "test-repo\feature-test"
501+
$EXPECTED_DIR = Join-Path $WORKTREE_ROOT "$TEST_REPO_NAME\feature-test"
501502
if ($CURRENT_DIR -ne $EXPECTED_DIR) {
502503
Write-Error "ERROR: Auto-cd failed for create. Expected: $EXPECTED_DIR, Got: $CURRENT_DIR"
503504
exit 1

0 commit comments

Comments
 (0)