versions() mac OS python test command line tools
This commit is contained in:
parent
27b354eeb5
commit
ab0b5e379f
@ -739,6 +739,20 @@ function versions(apps, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ({}.hasOwnProperty.call(appsObj.versions, 'python')) {
|
if ({}.hasOwnProperty.call(appsObj.versions, 'python')) {
|
||||||
|
if (_darwin) {
|
||||||
|
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/python');
|
||||||
|
if (util.darwinXcodeExists() || gitHomebrewExists) {
|
||||||
|
exec('python -V 2>&1', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
const python = stdout.toString().split('\n')[0] || '';
|
||||||
|
appsObj.versions.python = python.toLowerCase().replace('python', '').trim();
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
functionProcessed();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
exec('python -V 2>&1', function (error, stdout) {
|
exec('python -V 2>&1', function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
const python = stdout.toString().split('\n')[0] || '';
|
const python = stdout.toString().split('\n')[0] || '';
|
||||||
@ -747,7 +761,11 @@ function versions(apps, callback) {
|
|||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ({}.hasOwnProperty.call(appsObj.versions, 'python3')) {
|
if ({}.hasOwnProperty.call(appsObj.versions, 'python3')) {
|
||||||
|
if (_darwin) {
|
||||||
|
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/python3');
|
||||||
|
if (util.darwinXcodeExists() || gitHomebrewExists) {
|
||||||
exec('python3 -V 2>&1', function (error, stdout) {
|
exec('python3 -V 2>&1', function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
const python = stdout.toString().split('\n')[0] || '';
|
const python = stdout.toString().split('\n')[0] || '';
|
||||||
@ -755,6 +773,18 @@ function versions(apps, callback) {
|
|||||||
}
|
}
|
||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
functionProcessed();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
exec('python3 -V 2>&1', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
const python = stdout.toString().split('\n')[0] || '';
|
||||||
|
appsObj.versions.python3 = python.toLowerCase().replace('python', '').trim();
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ({}.hasOwnProperty.call(appsObj.versions, 'pip')) {
|
if ({}.hasOwnProperty.call(appsObj.versions, 'pip')) {
|
||||||
exec('pip -V 2>&1', function (error, stdout) {
|
exec('pip -V 2>&1', function (error, stdout) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user