fix(GODT-2277): Fix keychains initialisation in vault-editor (for write as well).

This commit is contained in:
Romain LE JEUNE
2023-11-13 15:37:32 +01:00
parent 159e1cee7d
commit ea26188dc0

View File

@ -65,7 +65,8 @@ func readAction(c *cli.Context) error {
func writeAction(c *cli.Context) error { func writeAction(c *cli.Context) error {
return app.WithLocations(func(locations *locations.Locations) error { return app.WithLocations(func(locations *locations.Locations) error {
return app.WithVault(locations, nil, async.NoopPanicHandler{}, func(vault *vault.Vault, insecure, corrupt bool) error { return app.WithKeychainList(func(keychains *keychain.List) error {
return app.WithVault(locations, keychains, async.NoopPanicHandler{}, func(vault *vault.Vault, insecure, corrupt bool) error {
b, err := io.ReadAll(os.Stdin) b, err := io.ReadAll(os.Stdin)
if err != nil { if err != nil {
return fmt.Errorf("failed to read vault: %w", err) return fmt.Errorf("failed to read vault: %w", err)
@ -76,4 +77,5 @@ func writeAction(c *cli.Context) error {
return nil return nil
}) })
}) })
})
} }