mirror of
https://github.com/kopia/kopia.git
synced 2026-01-29 00:33:24 -05:00
24 lines
384 B
Go
24 lines
384 B
Go
package cli
|
|
|
|
import (
|
|
"os"
|
|
|
|
"gopkg.in/alecthomas/kingpin.v2"
|
|
)
|
|
|
|
var (
|
|
disconnectCommand = app.Command("disconnect", "Connect to a vault.")
|
|
)
|
|
|
|
func init() {
|
|
disconnectCommand.Action(runDisconnectCommand)
|
|
}
|
|
|
|
func runDisconnectCommand(context *kingpin.ParseContext) error {
|
|
fn := vaultConfigFileName()
|
|
if _, err := os.Stat(fn); err == nil {
|
|
return os.Remove(fn)
|
|
}
|
|
return nil
|
|
}
|