code cleanup

This commit is contained in:
Sebastian Hildebrandt 2022-12-03 22:29:06 +01:00
parent ba073784cb
commit c926035d58

View File

@ -132,7 +132,7 @@ function fsSize(callback) {
}
if (_linux) {
cmd = 'df -lkPTx squashfs';
execSync('cat /proc/mounts').toString().split('\n').filter(line => {
execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => {
return line.startsWith('/');
}).forEach((line) => {
osMounts[line.split(' ')[0]] = line.toLowerCase().indexOf('rw') >= 0;