aboutsummaryrefslogtreecommitdiffstats
path: root/commands/termui.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-08-31 13:18:03 +0200
committerMichael Muré <batolettre@gmail.com>2018-08-31 17:22:10 +0200
commit7397c94d993541b33e555b758ebdb8f61ff33c6c (patch)
treedbdc52bb6efa03791e5ca84bc8695da5103524d2 /commands/termui.go
parent116a94401f0d3fbf79f7e20716b1c7b739e33246 (diff)
downloadgit-bug-7397c94d993541b33e555b758ebdb8f61ff33c6c.tar.gz
make CLI commands use the cache to lock the repo properly
Diffstat (limited to 'commands/termui.go')
-rw-r--r--commands/termui.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/commands/termui.go b/commands/termui.go
index 460770a6..5d600710 100644
--- a/commands/termui.go
+++ b/commands/termui.go
@@ -1,12 +1,19 @@
package commands
import (
+ "github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/termui"
"github.com/spf13/cobra"
)
func runTermUI(cmd *cobra.Command, args []string) error {
- return termui.Run(repo)
+ backend, err := cache.NewRepoCache(repo)
+ if err != nil {
+ return err
+ }
+ defer backend.Close()
+
+ return termui.Run(backend)
}
var termUICmd = &cobra.Command{