shell: merge some options

This commit is contained in:
Girish Ramakrishnan
2025-07-16 21:32:27 +02:00
parent e03beba9bc
commit 50b585c1dd
2 changed files with 4 additions and 3 deletions

View File

@@ -164,7 +164,8 @@ async function runBackupUpload(uploadConfig, progressCallback) {
result = progress.result;
}
const [error] = await safe(shell.promises.sudo([ BACKUP_UPLOAD_CMD, remotePath, backupConfig.format, dataLayout.toString() ], { env: envCopy, preserveEnv: true, ipc: true, onMessage, outputHasTimestamps: true }));
// do not use debug for logging child output because it already has timestamps via it's own debug
const [error] = await safe(shell.promises.sudo([ BACKUP_UPLOAD_CMD, remotePath, backupConfig.format, dataLayout.toString() ], { env: envCopy, preserveEnv: true, onMessage, logger: process.stdout.write }));
if (error && (error.code === null /* signal */ || (error.code !== 0 && error.code !== 50))) { // backuptask crashed
debug(`runBackupUpload: backuptask crashed`, error);
throw new BoxError(BoxError.INTERNAL_ERROR, 'Backuptask crashed');