mirror of
https://github.com/hanzoai/node-dtrace-provider.git
synced 2026-09-23 23:48:45 +00:00
We were always using node from the path, rather than respecting the $npm_config_prefix variable. We also used the 'process.config' object, which isn't available until node v0.8.x, so we now fall back on process.arch in that case.
14 lines
331 B
JavaScript
14 lines
331 B
JavaScript
// Output the architecture of this node build, either 'i386' or
|
|
// 'x86_64'
|
|
//
|
|
// This copes with both node 0.6.x and 0.8.x.
|
|
|
|
try {
|
|
// node 0.8
|
|
console.log(process.config.variables.target_arch == 'x64' ? 'x86_64' : 'i386')
|
|
}
|
|
catch (TypeError) {
|
|
// node 0.6
|
|
console.log(process.arch == 'x64' ? 'x86_64' : 'i386')
|
|
};
|