Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix caching behavior #92

Merged
merged 1 commit into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## master - unreleased

## v0.11.0 (February 27, 2021)

ENHANCEMENTS:

* Adding dry-run/confirm flags to the `add` command ([#91](https://github.com/fishi0x01/vsh/pull/91) - Thank you for implementation [dugshnay](https://github.com/dugshnay))

BUG FIXES:

* Fix stale cache in interactive mode ([#92](https://github.com/fishi0x01/vsh/pull/92))

## v0.10.0 (February 24, 2021)

ENHANCEMENTS:
Expand Down
3 changes: 2 additions & 1 deletion completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ func (c *Completer) absolutePathSuggestions(arg string) (result []prompt.Suggest
options, err = c.client.List(queryPath)

if err != nil {
panic(err)
log.UserError("Error during auto-completion: %s", err)
return result
}

options = append(options, "../")
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func (args) Description() string {

func executor(in string) {
// Every command can change the vault content
// i.e., the cache should be cleared on command execution
vaultClient.ClearCache()
// i.e., the cache should be cleared after a command got executed
defer vaultClient.ClearCache()

// Split the input separate the command and the arguments.
in = strings.TrimSpace(in)
Expand Down