backuptask: make upload/download async

This commit is contained in:
Girish Ramakrishnan
2022-04-28 21:29:11 -07:00
parent 7123ec433c
commit 8ef730ad9c
3 changed files with 37 additions and 60 deletions
+1
View File
@@ -102,5 +102,6 @@ function sudo(tag, args, options, callback) {
const cp = spawn(tag, SUDO, sudoArgs.concat(args), options, callback);
cp.stdin.end();
if (options.onMessage) cp.on('message', options.onMessage);
return cp;
}