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..b9ccc95dc 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 @@ -1153,6 +1154,7 @@ func EnglishTranslationSet() TranslationSet { StashIncludeUntrackedChanges: "Stash all changes including untracked files", StashOptions: "Stash options", NotARepository: "Error: must be run inside a git repository", + WorkingDirectoryDoesNotExist: "Error: the current working directory does not exist", Jump: "Jump to panel", ScrollLeftRight: "Scroll left/right", ScrollLeft: "Scroll left",