mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-09-13 14:59:09 +00:00
Merge 61883e4529
into 9c2c25aa7d
This commit is contained in:
commit
eb63bd73ce
1 changed files with 7 additions and 7 deletions
|
@ -19,18 +19,18 @@ import (
|
||||||
w "github.com/tobischo/gokeepasslib/v3/wrappers"
|
w "github.com/tobischo/gokeepasslib/v3/wrappers"
|
||||||
)
|
)
|
||||||
|
|
||||||
// KeepassExportCmd Exports a Passbolt Keepass
|
// KeepassExportCmd Exports a Passbolt KeePass
|
||||||
var KeepassExportCmd = &cobra.Command{
|
var KeepassExportCmd = &cobra.Command{
|
||||||
Use: "keepass",
|
Use: "keepass",
|
||||||
Short: "Exports Passbolt to a Keepass File",
|
Short: "Exports Passbolt to a KeePass File",
|
||||||
Long: `Exports Passbolt to a Keepass File`,
|
Long: `Exports Passbolt to a KeePass File`,
|
||||||
Aliases: []string{},
|
Aliases: []string{},
|
||||||
RunE: KeepassExport,
|
RunE: KeepassExport,
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
KeepassExportCmd.Flags().StringP("file", "f", "passbolt-export.kdbx", "File name of the Keepass File")
|
KeepassExportCmd.Flags().StringP("file", "f", "passbolt-export.kdbx", "File name of the KeePass File")
|
||||||
KeepassExportCmd.Flags().StringP("password", "p", "", "Password for the Keypass File, if empty prompts interactively")
|
KeepassExportCmd.Flags().StringP("password", "p", "", "Password for the KeePass File, if empty prompts interactively")
|
||||||
}
|
}
|
||||||
|
|
||||||
func KeepassExport(cmd *cobra.Command, args []string) error {
|
func KeepassExport(cmd *cobra.Command, args []string) error {
|
||||||
|
@ -58,10 +58,10 @@ func KeepassExport(cmd *cobra.Command, args []string) error {
|
||||||
cmd.SilenceUsage = true
|
cmd.SilenceUsage = true
|
||||||
|
|
||||||
if keepassPassword == "" {
|
if keepassPassword == "" {
|
||||||
pw, err := util.ReadPassword("Enter Keepass Password:")
|
pw, err := util.ReadPassword("Enter KeePass Password:")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
return fmt.Errorf("Reading Keepass Password: %w", err)
|
return fmt.Errorf("Reading KeePass Password: %w", err)
|
||||||
}
|
}
|
||||||
keepassPassword = pw
|
keepassPassword = pw
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue