-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alexpods
committed
Feb 12, 2015
1 parent
4563a9c
commit b2b46d2
Showing
4 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
'use strict'; | ||
|
||
var childProcess = require('child_process'); | ||
var cp = require('child_process'); | ||
|
||
var isIojs = function () { | ||
return /iojs\.org/.test(childProcess.execSync('node -h', { encoding: 'utf8' })); | ||
}; | ||
|
||
module.exports = isIojs; | ||
module.exports = (function () { | ||
if (!cp.execSync) { | ||
return false; | ||
} | ||
/** | ||
* @TODO: Make some reliable test for v1.0.0 and v1.0.1 versions | ||
*/ | ||
if (~[ 'v1.0.0', 'v1.0.1' ].indexOf(process.version)) { | ||
return true; | ||
} | ||
return /iojs\.org/.test(cp.execSync(process.execPath + ' -h', { encoding: 'ascii' })); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters