diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index 5d5d414e0..e959a189e 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -284,8 +284,7 @@ function testConfig(apiConfig, callback) { } if (apiConfig.provider === PROVIDER_MOUNTPOINT) { - safe.child_process.execSync(`mountpoint -q -- ${apiConfig.mountPoint}`, { encoding: 'utf8' }); - if (safe.error) return callback(new BoxError(BoxError.BAD_FIELD, `${apiConfig.mountPoint} is not mounted`, { field: 'mountPoint' })); + if (!safe.child_process.execSync(`mountpoint -q -- ${apiConfig.mountPoint}`)) return callback(new BoxError(BoxError.BAD_FIELD, `${apiConfig.mountPoint} is not mounted`, { field: 'mountPoint' })); } const backupPath = getBackupPath(apiConfig);