This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
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.
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.
It was only after writing and testing the code that I realised that there is already an open PR on the same topic: #101
I'd say that this PR (#106) is a bit more robust / conservative and complete, because:
/proc/cpuinfo
implementation ifuname
is not available (however unlikely). Note thatspawnSync('uname', ['-a'])
does not throw an Error ifuname
does not exist, but setsuname.error
which the code detects.uname -a
is a bit more robust thanuname -m
(thinking of all different Unix kernels out there: BSD, Solaris, Linux, even perhaps macOS...), as it does not rely on a particular field or implementation ofuname
.arm64
(e.g. Raspberry Pi 4) in addition toarmv7
(e.g. Raspberry Pi 2/3). I've tested on both!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.
Close this PR so :)
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.
Sorry, my writing was ambiguous (I've now edited it): I meant that this PR (#106) is better than the pre-existing one (#101). But I leave it for reviewers to decide whether they agree! :-)
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.
Oh ok sorry I misunderstood the comment
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.
@pdcastro I really appreciate your help here and the descriptive comment!