Skip to content

Commit

Permalink
Merge pull request #896 from prey/fix/wipe-variables-declared
Browse files Browse the repository at this point in the history
fix: fix variable names in wipe.js for directories to wipe
  • Loading branch information
beregcamlost authored Nov 6, 2023
2 parents 9259f6b + 0552ca6 commit 4102d8b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/agent/actions/wipe/wipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ const { join } = require('path');
const { exec } = require('child_process');
const os = require('os');
const async = require('async');
const common = require('../../common');

const logger = common.logger.prefix('wipejs');

const osName = process.platform.replace('win32', 'windows').replace('darwin', 'mac');
// eslint-disable-next-line import/no-dynamic-require
Expand Down Expand Up @@ -206,8 +203,8 @@ exports.fetch_dirs = (items, toErase, toKill, cred, cb) => {
if (toErase.length > 0 && toErase[0] !== '') { dirsToWipe = dirsToWipe.concat(toErase); }

const jsonDirs = {};
jsonDirs.dirs_to_wipe = dirsToWipe;
jsonDirs.dirs_to_wipe_keep = dirsToWipeKeep;
jsonDirs.dirsToWipe = dirsToWipe;
jsonDirs.dirsToWipeKeep = dirsToWipeKeep;

if (toKill.length === 0 || toKill[0] === '') { return cb(null, jsonDirs); }

Expand All @@ -220,4 +217,4 @@ exports.wipeout = (cb) => {
exec(cmd, (err, stdout) => {
cb(err, cmd + stdout);
});
};
};

0 comments on commit 4102d8b

Please sign in to comment.