diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-05-18 22:22:28 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 22:22:28 +1000 |
commit | 499d51ecf624d711cfc0eb99634fe26463a40f49 (patch) | |
tree | 53a4b6e6ea3b38d98b62aff5b3390ed99e3fe63e | |
parent | e1e16a34da0724e31be59318d18d2ac37ea5603f (diff) | |
parent | 1de5ca3511b677bdeb3f7ac066dcfeb5b693ae6f (diff) |
Merge pull request #1931 from mark2185/fix-non-existant-recent-repo
-rw-r--r-- | pkg/app/app.go | 2 | ||||
-rw-r--r-- | pkg/i18n/english.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go index e51e5d47c..f12c0f08a 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -190,9 +190,9 @@ func (app *App) setupRepo() (bool, error) { return true, nil } } - return false, err } + fmt.Println(app.Tr.NoRecentRepositories) os.Exit(1) } if err := app.OSCommand.Cmd.New("git init").Run(); err != nil { diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 3b1d3aa6f..570eeeab3 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -256,6 +256,7 @@ type TranslationSet struct { DiscardFileChangesPrompt string DisabledForGPG string CreateRepo string + NoRecentRepositories string AutoStashTitle string AutoStashPrompt string StashPrefix string @@ -878,6 +879,7 @@ func EnglishTranslationSet() TranslationSet { DiscardFileChangesPrompt: "Are you sure you want to discard this commit's changes to this file? If this file was created in this commit, it will be deleted", DisabledForGPG: "Feature not available for users using GPG", CreateRepo: "Not in a git repository. Create a new git repository? (y/n): ", + NoRecentRepositories: "Must open lazygit in a git repository. No valid recent repositories. Exiting.", AutoStashTitle: "Autostash?", AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)", StashPrefix: "Auto-stashing changes for ", |