Fix node-arch sniffing for node 0.6 and to use the correct node.#24
Fix node-arch sniffing for node 0.6 and to use the correct node.#24trentm wants to merge 1 commit intochrisa:masterfrom
Conversation
- Use npm_config_prefix to use the node invoking this npm - node < 0.8 doesn't have 'process.config'
|
Thanks for the report! I've actually gone a slightly different way to fix the issues - I moved the javascript oneliner into a script and extended it to try process.arch as an alternative to process.config. This avoids getting involved in the differences in file(1) output on various platforms. I also checked for a value in $npm_config_prefix to support building without npm, directly using node-gyp. Would you be able to try the changes in my issue_24 branch, and see if they work OK in your environment? |
|
Yup, your changes work for me (0.6 and 0.8 on SmartOS and Mac). Looking forward to a published ver with this. Thanks! FWIW, a side nit: there is also no to be explicit. |
|
Good call on "engines" - I've added that. Version 0.2.4 is now published into NPM with these changes. Thanks! |
|
Thanks! Working for me in bunyan@0.16.3 |
Hi Chris,
Without this patch the "ARCH=" sniffing would blow up with node 0.6, resulting in a fallback to 'isainfo -k' arch... which in my case was 64-bit when the relevant node build was 32-bit -> boom.