Skip to content

Commit

Permalink
Merge pull request #352 from prey/custom-wipe-dirs-fix
Browse files Browse the repository at this point in the history
Custom wipe fix for many directories
  • Loading branch information
javo authored Jan 12, 2018
2 parents 618c58a + 8489393 commit 9beae56
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/agent/actions/wipe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ exports.start = function(opts, cb) {
child.stdout.on('data', function(str) {
var lines = str.toString().split(/\n/);
lines.forEach(function(line) {
if (line.toString().match('File removed')) {
if (line.toString().match('Removing directory')) {
logger.warn(line.trim());
removed++;
} else if (line.toString().match('Error while removing dir')) {
Expand All @@ -116,13 +116,13 @@ exports.start = function(opts, cb) {
}

var finished = function(err) {
logger.warn('Process finished! ' + removed + ' files removed.');
logger.warn('Process finished! ' + removed + ' dir(s) removed.');

if (!emitter) return;

// if no files were removed, treat that as an error
if (!err && removed == 0) {
emitter.emit('end', new Error('No files were removed.'));
emitter.emit('end', new Error('No dirs were removed.'));
} else {
emitter.emit('end', err, { files_removed: removed });
}
Expand Down
Binary file modified lib/agent/actions/wipe/linux/wipe-linux
Binary file not shown.
Binary file modified lib/agent/actions/wipe/mac/wipe-osx
Binary file not shown.
Binary file modified lib/agent/actions/wipe/windows/wipe-win.exe
100755 → 100644
Binary file not shown.
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9beae56

Please sign in to comment.