Repository navigation
Conversation
Hanaasagi
reviewed
Nov 6, 2023
| set(DEFAULT_USE_STATIC_LIBATOMIC ON) | ||
| if(UNIX AND NOT APPLE) | ||
| execute_process(COMMAND cat /etc/os-release COMMAND head -n1 OUTPUT_VARIABLE LINUX_DISTRO) | ||
| execute_process(COMMAND cat /usr/lib/os-release COMMAND head -n1 OUTPUT_VARIABLE LINUX_DISTRO) |
Contributor
There was a problem hiding this comment.
Also fixes build not working on arch distros having different names.
Which distribution has this issue?
afak, /etc/os-release has a higher priority.
The file /etc/os-release takes precedence over /usr/lib/os-release. Applications should check for the former, and exclusively use its data if it exists, and only fall back to /usr/lib/os-release if it is missing.
Author
There was a problem hiding this comment.
I have CachyOS Linux currently which doesn't return Arch Linux for the previous one. Hence the former change.
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.
What does this PR do?
This allows
bun xcommand to search first for local binaries mentioned in the root package.json and execute them if found similar to npx, which wasn't possible earlier.For example we have a package.json in our root dir
{ "name": "cli", "module": "index.ts", "type": "module", "bin": "./index.ts", "devDependencies": { "bun-types": "latest" }, "peerDependencies": { "typescript": "^5.0.0" } }Previously
bun x cliwould not execute this binary butnpx cliworked. This PR allowsbun x clito work as expected and to execute local binaries from root package.json.Also fixes build not working on arch distros having different names.
How did you verify your code works?
Manual tests.