shell: rewrite exec to use execFile

this also renames execFile to execArgs
This commit is contained in:
Girish Ramakrishnan
2024-02-21 18:37:10 +01:00
parent 14c9260ab0
commit cfd5c0f82b
6 changed files with 33 additions and 49 deletions

View File

@@ -60,7 +60,7 @@ async function checkPreconditions(backupConfig, dataLayout) {
let used = 0;
for (const localPath of dataLayout.localPaths()) {
debug(`checkPreconditions: getting disk usage of ${localPath}`);
const result = await shell.promises.exec('checkPreconditions', `du -Dsb --exclude='*.lock' --exclude='dovecot.list.index.log.*' "${localPath}"`, {});
const result = await shell.promises.execArgs('checkPreconditions', 'du', [ '-Dsb', '--exclude=*.lock', '--exclude=dovecot.list.index.log.*', localPath], {});
used += parseInt(result, 10);
}