Skip to content

Commit

Permalink
Fix caching behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
fishi0x01 committed Feb 27, 2021
1 parent a230fa9 commit f467671
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:

* Proper arg parsing with help text for subcommands ([#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 f467671

Please sign in to comment.