Skip to content

Remove unreachable FreeBSD and OpenBSD platform detection#1088

Merged
smorimoto merged 1 commit intomasterfrom
remove-unreachable-bsd-platform-detection
Mar 27, 2026
Merged

Remove unreachable FreeBSD and OpenBSD platform detection#1088
smorimoto merged 1 commit intomasterfrom
remove-unreachable-bsd-platform-detection

Conversation

@smorimoto
Copy link
Copy Markdown
Member

@smorimoto smorimoto commented Mar 27, 2026

Summary

  • Remove the unreachable case "freebsd" and case "openbsd" branches from the platform detection switch in constants.ts
  • Update the error message to list only the supported platforms: darwin, linux, win32

These branches are dead code because:

  1. The GitHub Actions runner does not officially support FreeBSD or OpenBSD (actions/runner#385)
  2. Running the runner via FreeBSD's Linux Compatibility Layer (Linuxulator) causes process.platform to return "linux", so the FreeBSD branch is never reached
  3. vmactions/freebsd-vm runs a QEMU VM, but JavaScript actions execute on the Ubuntu host, not inside the VM

See the investigation comment on #743 for full details.

Closes #743

Test plan

  • yarn build succeeds
  • yarn lint passes
  • Verify existing CI passes on Linux, macOS, and Windows (no behavioural change for supported platforms)

The FreeBSD and OpenBSD cases in the platform detection switch are
unreachable dead code in any practical GitHub Actions environment:

- The GitHub Actions runner does not officially support FreeBSD or
  OpenBSD (actions/runner#385).
- Running the runner via FreeBSD's Linux Compatibility Layer
  (Linuxulator) causes process.platform to return "linux", not
  "freebsd", so the FreeBSD branch is never reached.
- vmactions/freebsd-vm runs a QEMU VM, but JavaScript actions
  execute on the Ubuntu host, not inside the VM.

Closes #743
@smorimoto smorimoto added the enhancement New feature or request label Mar 27, 2026
@smorimoto smorimoto merged commit 55850d2 into master Mar 27, 2026
18 checks passed
@smorimoto smorimoto deleted the remove-unreachable-bsd-platform-detection branch March 27, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running in FreeBSD with vmactions/freebsd-vm

1 participant