fsSize() improved error handling (linux alpine)

This commit is contained in:
Sebastian Hildebrandt
2023-06-07 20:26:41 +02:00
parent 58b64788a7
commit 7f2cf7a4ce
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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);
}