mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
fix(GODT-2277): Fix keychains initialisation in vault-editor (for write as well).
This commit is contained in:
@ -65,15 +65,17 @@ 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 {
|
||||||
b, err := io.ReadAll(os.Stdin)
|
return app.WithVault(locations, keychains, async.NoopPanicHandler{}, func(vault *vault.Vault, insecure, corrupt bool) error {
|
||||||
if err != nil {
|
b, err := io.ReadAll(os.Stdin)
|
||||||
return fmt.Errorf("failed to read vault: %w", err)
|
if err != nil {
|
||||||
}
|
return fmt.Errorf("failed to read vault: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
vault.ImportJSON(b)
|
vault.ImportJSON(b)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user