versions() fixed issue (mac OS)

This commit is contained in:
Sebastian Hildebrandt 2020-12-22 15:40:47 +01:00
parent 072afaebe9
commit 3887f5efef
5 changed files with 55 additions and 17 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 4.33.1 | 2020-12-22 | `versions()` fixed issue (mac OS) |
| 4.33.0 | 2020-12-21 | `graphics()` nvidia-smi support (linux, windows) |
| 4.32.0 | 2020-12-14 | `graphics()` clinfo support (linux) |
| 4.31.2 | 2020-12-14 | `graphics()` Windows 7 Graphics Fixes (Multi Monitor) |

View File

@ -30,7 +30,7 @@
[![Sponsoring][sponsor-badge]][sponsor-url]
[![MIT license][license-img]][license-url]
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 350 versions published, up to 2.5 mio downloads per month, > 20 mio downloads overall. Thank you to all who contributed to this project!
This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 350 versions published, up to 3 mio downloads per month, > 25 mio downloads overall. Thank you to all who contributed to this project!
## Upcoming

View File

@ -83,10 +83,15 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.33.1</th>
<td>2020-12-22</td>
<td><span class="code">versions()</span> fixed issue (mac OS)</td>
</tr>
<tr>
<th scope="row">4.33.0</th>
<td>2020-12-21</td>
<td><span class="code">graphics()</span> nvidia-smi support (linux)</td>
<td><span class="code">graphics()</span> nvidia-smi support (linux, windows)</td>
</tr>
<tr>
<th scope="row">4.32.0</th>

View File

@ -169,7 +169,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.33.0</span></div>
<div class="version">Current Version: <span id="version">4.33.1</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -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) {