Remove unreachable FreeBSD and OpenBSD platform detection#1088
Merged
Remove unreachable FreeBSD and OpenBSD platform detection#1088
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
case "freebsd"andcase "openbsd"branches from the platform detection switch inconstants.tsdarwin,linux,win32These branches are dead code because:
process.platformto return"linux", so the FreeBSD branch is never reachedvmactions/freebsd-vmruns a QEMU VM, but JavaScript actions execute on the Ubuntu host, not inside the VMSee the investigation comment on #743 for full details.
Closes #743
Test plan
yarn buildsucceedsyarn lintpasses