From 15bf95e6862ebb9bab17ee09b8e2886c746c9a70 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 11 Jan 2015 19:01:52 -0500 Subject: utils.go: Change error message when no history file When getting a list of branches but the file doesn't exist, print a custom error message that informs users that it's necessary to run `git-checkout-store` before `git-checkout-history` will be able to do anything. --- utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.go b/utils/utils.go index 52af88a..5f686f7 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -70,7 +70,7 @@ func Branches() []string { file_path := getHomeDir() + "/" + history_file data, err := ioutil.ReadFile(file_path) if err != nil { - log.Fatal(err) + log.Fatal("ERROR: No checkout history file. Run `checkout-store` to create it.") } err = yaml.Unmarshal(data, &branchList) -- cgit v1.2.3