versions() fixed issue (mac OS)
This commit is contained in:
+46
-14
@@ -790,24 +790,56 @@ function versions(apps, callback) {
|
||||
}
|
||||
}
|
||||
if ({}.hasOwnProperty.call(appsObj.versions, 'pip')) {
|
||||
exec('pip -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip = parts.length >= 2 ? parts[1] : '';
|
||||
if (_darwin) {
|
||||
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/pip');
|
||||
if (util.darwinXcodeExists() || gitHomebrewExists) {
|
||||
exec('pip -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip = parts.length >= 2 ? parts[1] : '';
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
} else {
|
||||
functionProcessed();
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
} else {
|
||||
exec('pip -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip = parts.length >= 2 ? parts[1] : '';
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
}
|
||||
}
|
||||
if ({}.hasOwnProperty.call(appsObj.versions, 'pip3')) {
|
||||
exec('pip3 -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip3 = parts.length >= 2 ? parts[1] : '';
|
||||
if (_darwin) {
|
||||
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/pip3');
|
||||
if (util.darwinXcodeExists() || gitHomebrewExists) {
|
||||
exec('pip3 -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip3 = parts.length >= 2 ? parts[1] : '';
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
} else {
|
||||
functionProcessed();
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
} else {
|
||||
exec('pip3 -V 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
const pip = stdout.toString().split('\n')[0] || '';
|
||||
const parts = pip.split(' ');
|
||||
appsObj.versions.pip3 = parts.length >= 2 ? parts[1] : '';
|
||||
}
|
||||
functionProcessed();
|
||||
});
|
||||
}
|
||||
}
|
||||
if ({}.hasOwnProperty.call(appsObj.versions, 'java')) {
|
||||
if (_darwin) {
|
||||
|
||||
Reference in New Issue
Block a user