versions() improved powerShell parsing (windows)
This commit is contained in:
+1
-1
@@ -1081,7 +1081,7 @@ function versions(apps, callback) {
|
||||
if ({}.hasOwnProperty.call(appsObj.versions, 'powershell')) {
|
||||
if (_windows) {
|
||||
util.powerShell('$PSVersionTable').then(stdout => {
|
||||
const lines = stdout.toString().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':'));
|
||||
const lines = stdout.toString().toLowerCase().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':'));
|
||||
appsObj.versions.powershell = util.getValue(lines, 'psversion');
|
||||
functionProcessed();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user