Skip to content

Commit

Permalink
Merge pull request #92 from fishi0x01/fix-cache
Browse files Browse the repository at this point in the history
Fix caching behavior
  • Loading branch information
fishi0x01 authored Feb 27, 2021
2 parents a230fa9 + 43ad0ca commit 641079a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
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

0 comments on commit 641079a

Please sign in to comment.