mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-07 11:00:39 +00:00
rewrite with commander
This commit is contained in:
13
src/handlers/forget.ts
Normal file
13
src/handlers/forget.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { checkAndConfigureBackendsForLocations } from '../backend'
|
||||
import { forgetAll } from '../forget'
|
||||
import { Flags, Locations } from '../types'
|
||||
import { checkIfResticIsAvailable, parseLocations } from '../utils'
|
||||
|
||||
export default function forget({ location, all, dryRun }: Flags) {
|
||||
checkIfResticIsAvailable()
|
||||
const locations: Locations = parseLocations(location, all)
|
||||
checkAndConfigureBackendsForLocations(locations)
|
||||
forgetAll(locations, dryRun)
|
||||
|
||||
console.log('\nFinished!'.underline + ' 🎉')
|
||||
}
|
Reference in New Issue
Block a user