powerShell() Windows 7 fix compatibility issues (windows)
This commit is contained in:
@@ -195,6 +195,7 @@ function fsSize(drive, callback) {
|
||||
resolve(data);
|
||||
} else {
|
||||
exec('df -kPT 2>/dev/null', { maxBuffer: 1024 * 1024 }, (error, stdout) => {
|
||||
// fixed issue alpine fallback
|
||||
const lines = filterLines(stdout);
|
||||
data = parseDf(lines);
|
||||
if (callback) {
|
||||
|
||||
@@ -509,6 +509,7 @@ function powerShell(cmd) {
|
||||
process.nextTick(() => {
|
||||
try {
|
||||
const osVersion = os.release().split('.').map(Number);
|
||||
// windows 7 compatibility issue
|
||||
const spanOptions =
|
||||
osVersion[0] < 10
|
||||
? ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-']
|
||||
|
||||
Reference in New Issue
Block a user