shell.exec -> shell.spawn

This commit is contained in:
Girish Ramakrishnan
2018-11-17 19:26:19 -08:00
parent 1b1945e1f5
commit fd4057df94
6 changed files with 12 additions and 12 deletions

View File

@@ -120,7 +120,7 @@ function copy(apiConfig, oldFilePath, newFilePath) {
// this will hardlink backups saving space
var cpOptions = apiConfig.noHardlinks ? '-a' : '-al';
shell.exec('copy', '/bin/cp', [ cpOptions, oldFilePath, newFilePath ], { }, function (error) {
shell.spawn('copy', '/bin/cp', [ cpOptions, oldFilePath, newFilePath ], { }, function (error) {
if (error) return events.emit('done', new BackupsError(BackupsError.EXTERNAL_ERROR, error.message));
events.emit('done', null);
@@ -155,7 +155,7 @@ function removeDir(apiConfig, pathPrefix) {
events.emit('progress', `removeDir: ${pathPrefix}`);
shell.exec('removeDir', '/bin/rm', [ '-rf', pathPrefix ], { }, function (error) {
shell.spawn('removeDir', '/bin/rm', [ '-rf', pathPrefix ], { }, function (error) {
if (error) return events.emit('done', new BackupsError(BackupsError.EXTERNAL_ERROR, error.message));
events.emit('done', null);