From 45b67cb2b91dc7c7104532fe7132800faf9413ad Mon Sep 17 00:00:00 2001 From: David Dworken Date: Tue, 9 Jul 2024 18:40:50 -0700 Subject: [PATCH] Add additional fallback method for retrieving the CWD to further improve the situation for #226 --- client/cmd/saveHistoryEntry.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/cmd/saveHistoryEntry.go b/client/cmd/saveHistoryEntry.go index 111263d..45676cb 100644 --- a/client/cmd/saveHistoryEntry.go +++ b/client/cmd/saveHistoryEntry.go @@ -648,6 +648,10 @@ func getCwdWithoutSubstitution() (string, error) { return cwd, nil } } + cwd = os.Getenv("PWD") + if cwd != "" && strings.HasPrefix(cwd, "/") { + return cwd, nil + } return "", err }