fsSize() improved error handling (linux alpine)
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ function fsSize(drive, callback) {
|
||||
return item.fs.toLowerCase().indexOf(drive.toLowerCase()) >= 0 || item.mount.toLowerCase().indexOf(drive.toLowerCase()) >= 0;
|
||||
});
|
||||
}
|
||||
if ((!error || data.length) && stdout.toString().toLowerCase().indexOf('unrecognized option') === -1) {
|
||||
if ((!error || data.length) && stdout.toString().trim() !== '') {
|
||||
if (callback) {
|
||||
callback(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user