diff options
| author | Shulhan <ms@kilabit.info> | 2023-05-19 22:31:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-05-19 22:31:56 +0700 |
| commit | a31b534b36eda669bab99819e4b45fa343ff38d9 (patch) | |
| tree | da14195f9625565adf362484c5740bded25ffe6f /cli_test.go | |
| parent | dded88bf1546f30185e2fc30c11e4f1322abd213 (diff) | |
| download | gotp-a31b534b36eda669bab99819e4b45fa343ff38d9.tar.xz | |
all: load private key only when needed
In case the configuration use private key with passphrase, the bash
completion will hang due to the command ask for passphrase.
This changes fix this issue by loading private key only when doing add,
generate, import, or remote-private-key.
Diffstat (limited to 'cli_test.go')
| -rw-r--r-- | cli_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli_test.go b/cli_test.go index 70a5e1d..81253b1 100644 --- a/cli_test.go +++ b/cli_test.go @@ -191,6 +191,11 @@ func TestCli_SetPrivateKey(t *testing.T) { } cli.cfg = cfg + cli.cfg.privateKey, err = loadPrivateKey(cli.cfg.PrivateKey, nil) + if err != nil { + t.Fatal(err) + } + var ( gotLabels []string = cli.List() label string |
