diff --git a/pkg/app/errors.go b/pkg/app/errors.go index 2561fccb8..02e9470e0 100644 --- a/pkg/app/errors.go +++ b/pkg/app/errors.go @@ -27,6 +27,10 @@ func knownError(tr *i18n.TranslationSet, err error) (string, bool) { originalError: "fatal: not a git repository", newError: tr.NotARepository, }, + { + originalError: "getwd: no such file or directory", + newError: tr.WorkingDirectoryDoesNotExist, + }, } if mapping, ok := lo.Find(mappings, func(mapping errorMapping) bool { diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 80e89ceff..a7f4a0de4 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -335,6 +335,7 @@ type TranslationSet struct { StashIncludeUntrackedChanges string StashOptions string NotARepository string + WorkingDirectoryDoesNotExist string Jump string ScrollLeftRight string ScrollLeft string @@ -1120,6 +1121,7 @@ func EnglishTranslationSet() TranslationSet { InitialBranch: "Branch name? (leave empty for git's default): ", NoRecentRepositories: "Must open lazygit in a git repository. No valid recent repositories. Exiting.", IncorrectNotARepository: "The value of 'notARepository' is incorrect. It should be one of 'prompt', 'create', 'skip', or 'quit'.", + WorkingDirectoryDoesNotExist: "The current working directory does not exist", AutoStashTitle: "Autostash?", AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)", StashPrefix: "Auto-stashing changes for ",