Skip to content

Commit

Permalink
fix versioning for node-webkit when target is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithgol committed Sep 17, 2014
1 parent 590a813 commit 756ad4d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/util/versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ function get_node_abi(runtime, target) {
return 'v8-' + abi;
}
} else {
if (runtime === 'node-webkit') {
if (typeof process.versions['node-webkit'] === 'undefined') {
// erroneous CLI call
throw new Error("Empty target version is not supported if node-webkit is the target.");
}
return runtime + '-v' + process.versions['node-webkit'];
}
// process.versions.modules added in >= v0.10.4 and v0.11.7
// https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e
return process.versions.modules ? runtime+'-v' + (+process.versions.modules) :
Expand Down

0 comments on commit 756ad4d

Please sign in to comment.