Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom wipe fix for many directories #352

Merged
merged 1 commit into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.