-
-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add $N_ARCH
as a default architecture
#832
Conversation
README.md
Outdated
@@ -266,10 +266,15 @@ Another example is the Node.js [unofficial-builds project](https://github.com/no | |||
|
|||
export N_NODE_MIRROR=https://unofficial-builds.nodejs.org/download/release | |||
|
|||
You may need to specify the architecture explicitly if not autodetected by `n`, such as using `musl` `libc` on Alpine: | |||
You may need to specify the architecture explicitly if not autodetected by `n`, such as using `musl` `libc` on Alpine. You can do that with using `N_ARCH`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fine to just have N_ARCH
covered in example here:
You may need to specify the architecture explicitly if not autodetected by `n`, such as using `musl` `libc` on Alpine. You can do that with using `N_ARCH`: | |
You may need to specify the architecture explicitly if not autodetected by `n`, such as using `musl` `libc` on Alpine. You can do that with `N_ARCH` or `--arch`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combined both, see the new patch which I'll push shortly.
README.md
Outdated
or using `--arch`: | ||
|
||
n --arch x64-musl install lts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can leave out the --arch
usage here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Left a comment at the end of the line, to avoid the illusion that both are needed...)
Thanks. Lots of cosmetic comments. I'll do some testing before approving. |
More convenient to use than --arch in case of a mirror with exotic architecture, like the ones in `unofficial-builds`. Do this by making it the default for `$ARCH`. Also, skip the `uname -m` if it's not needed because of this, or because of `--arch`, or the version-specific default. (This is not needed for the functionality.)
a5eac0b
to
78d09e9
Compare
Made all changes. (You might have more comments though, so not to be taken blindly...) |
Pull Request
More convenient to use than --arch in case of a mirror with exotic architecture, like the ones in
unofficial-builds
.Do this by making it the default for
$ARCH
.Also, skip the
uname -m
if it's not needed because of this, or because of--arch
, or the version-specific default. (This is not needed for the functionality.)Problem
See #830.
Solution
The actual fix is just:
The rest are:
$N_ARCH
exists if unsetuname -m
if$ARCH
is set (this could be done in a separate PR)$N_ARCH
inshow_diagnostics
ChangeLog
New
$N_ARCH
to set a default architecture.