Skip to content

Commit 9d27279

Browse files
yotsudaclaude
andcommitted
Fix macOS pipe search to include $TMPDIR
macOS creates UNIX domain sockets in $TMPDIR (/var/folders/.../T/), not /tmp. Search both locations in the E2E test workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b23ace8 commit 9d27279

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/macos-terminal-test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ jobs:
6161
6262
# Wait for Named Pipe to appear
6363
echo "Waiting for Named Pipe..."
64+
echo "TMPDIR=$TMPDIR"
6465
for i in $(seq 1 60); do
65-
PIPE=$(find /tmp -name "CoreFxPipe_PSMCP.*" 2>/dev/null | head -1)
66+
PIPE=$(find /tmp ${TMPDIR:-/tmp} -name "CoreFxPipe_PSMCP.*" 2>/dev/null | sort -u | head -1)
6667
if [ -n "$PIPE" ]; then
6768
echo "Named Pipe found: $PIPE (after ${i}s)"
6869
break
@@ -85,16 +86,15 @@ jobs:
8586
run: |
8687
$ErrorActionPreference = "Stop"
8788
88-
# Find the Named Pipe
89-
$pipes = Get-ChildItem /tmp/CoreFxPipe_PSMCP.* -ErrorAction SilentlyContinue
90-
if (-not $pipes) {
91-
# Also check TMPDIR
92-
$tmpdir = $env:TMPDIR
93-
if ($tmpdir) {
94-
$pipes = Get-ChildItem "$tmpdir/CoreFxPipe_PSMCP.*" -ErrorAction SilentlyContinue
95-
}
89+
# Find the Named Pipe (macOS uses $TMPDIR which is /var/folders/.../T/)
90+
$searchDirs = @('/tmp')
91+
if ($env:TMPDIR -and $env:TMPDIR -ne '/tmp') { $searchDirs += $env:TMPDIR.TrimEnd('/') }
92+
Write-Host "Searching for pipes in: $($searchDirs -join ', ')"
93+
$pipes = @()
94+
foreach ($dir in $searchDirs) {
95+
$pipes += Get-ChildItem "$dir/CoreFxPipe_PSMCP.*" -ErrorAction SilentlyContinue
9696
}
97-
if (-not $pipes) { throw "No Named Pipe found" }
97+
if (-not $pipes) { throw "No Named Pipe found in: $($searchDirs -join ', ')" }
9898
9999
$pipeName = $pipes[0].Name -replace '^CoreFxPipe_', ''
100100
Write-Host "Using pipe: $pipeName"

0 commit comments

Comments
 (0)