replace indead of adding

This commit is contained in:
cupcakearmy 2019-12-03 23:30:53 +01:00
parent b2d01d77d9
commit b5daff07eb

View File

@ -18,8 +18,8 @@ export const forgetSingle = (dryRun: boolean, name: string, from: string, to: st
flags.push('--dry-run') flags.push('--dry-run')
} }
const env = getEnvFromBackend(backend) const env = getEnvFromBackend(backend)
writer.appendLn(name + to.blue + ' : ' + 'Forgeting old snapshots… ⏳') writer.replaceLn(name + to.blue + ' : ' + 'Forgeting old snapshots… ⏳')
const cmd = exec('restic', ['forget', '--path', from, '--prune', ...flags], {env}) const cmd = exec('restic', ['forget', '--path', from, '--prune', ...flags], { env })
if (VERBOSE) console.log(cmd.out, cmd.err) if (VERBOSE) console.log(cmd.out, cmd.err)
writer.done(name + to.blue + ' : ' + 'Done ✓'.green) writer.done(name + to.blue + ' : ' + 'Done ✓'.green)
@ -42,7 +42,7 @@ export const forgetLocation = (dryRun: boolean, name: string, backup: Location,
} }
} else forgetSingle(dryRun, display, backup.from, backup.to, policy) } else forgetSingle(dryRun, display, backup.from, backup.to, policy)
} }
} }
export const forgetAll = (dryRun: boolean, backups?: Locations) => { export const forgetAll = (dryRun: boolean, backups?: Locations) => {
if (!config) throw ConfigError if (!config) throw ConfigError