mirror of
https://github.com/kopia/kopia.git
synced 2026-02-05 12:13:29 -05:00
21 lines
425 B
Go
21 lines
425 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/repo"
|
|
)
|
|
|
|
var (
|
|
disconnectCommand = repositoryCommands.Command("disconnect", "Disconnect from a repository.")
|
|
)
|
|
|
|
func init() {
|
|
disconnectCommand.Action(noRepositoryAction(runDisconnectCommand))
|
|
}
|
|
|
|
func runDisconnectCommand(ctx context.Context) error {
|
|
deletePassword(repositoryConfigFileName(), getUserName())
|
|
return repo.Disconnect(repositoryConfigFileName())
|
|
}
|