From 9fb9962ce7043bc3152bb0bee4a7ac17c35592d6 Mon Sep 17 00:00:00 2001 From: Giorgio Previtera Date: Sun, 7 Jul 2019 19:15:11 +0100 Subject: 472 - Don't panic if not in a repository Display a friendly message and exit with an error if not in a Git repository. Using the same approach used in this PR: https://github.com/jesseduffield/lazydocker/pull/14/files --- pkg/i18n/dutch.go | 3 +++ pkg/i18n/english.go | 3 +++ pkg/i18n/polish.go | 3 +++ 3 files changed, 9 insertions(+) (limited to 'pkg/i18n') diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go index d736e2771..7d93b051c 100644 --- a/pkg/i18n/dutch.go +++ b/pkg/i18n/dutch.go @@ -748,6 +748,9 @@ func addDutch(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "stashOptions", Other: "Stash options", + }, &i18n.Message{ + ID: "notARepository", + Other: "Error: must be run inside a repository", }, ) } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 82ba1b505..50a6e30a6 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -771,6 +771,9 @@ func addEnglish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "stashOptions", Other: "Stash options", + }, &i18n.Message{ + ID: "notARepository", + Other: "Error: must be run inside a repository", }, ) } diff --git a/pkg/i18n/polish.go b/pkg/i18n/polish.go index bd5fed9d5..7b32b3eaa 100644 --- a/pkg/i18n/polish.go +++ b/pkg/i18n/polish.go @@ -731,6 +731,9 @@ func addPolish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "stashOptions", Other: "Stash options", + }, &i18n.Message{ + ID: "notARepository", + Other: "Error: must be run inside a repository", }, ) } -- cgit v1.2.3