Skip to content

cmd/tailcat: hardcode /dev/null instead of os.DevNull - #213

Merged
bradfitz merged 1 commit into
tailscale:mainfrom
A2uria:fix-ssh-devnull-windows
Dec 3, 2026
Merged

bradfitz merged 1 commit into
tailscale:mainfrom
A2uria:fix-ssh-devnull-windows

Conversation

@A2uria

@A2uria A2uria commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

On Windows, os.DevNull resolves to "NUL". When the openssh from msys2/git-for-windows is used, "NUL" is treated as a literal file name rather than the null device, causing a file named NUL to be created in the current working directory.

Hardcode "/dev/null" instead, matching the approach used by the GitHub CLI. This delegates null-device handling to openssh, which already understands /dev/null correctly across Windows builds.

Fixes #211

On Windows, os.DevNull resolves to "NUL". When the openssh from
msys2/git-for-windows is used, "NUL" is treated as a literal file
name rather than the null device, causing a file named NUL to be
created in the current working directory.

Hardcode "/dev/null" instead, matching the approach used by the
GitHub CLI. This delegates null-device handling to openssh, which
already understands /dev/null correctly across Windows builds.

Fixes #211
@bradfitz
bradfitz merged commit 46d5d06 into tailscale:main Dec 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSH: UserKnownHostsFile=NUL creates file NUL as known_hosts with msys2 / git-for-windows openssh

2 participants