From 07b35def777bb9c6b5ecb3a221537503de432410 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 6 Mar 2022 18:46:53 +0300 Subject: [PATCH] add missing error contexts for getwd calls --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 9867460..ddb23d4 100644 --- a/main.go +++ b/main.go @@ -67,7 +67,7 @@ func exportEnvVars() { dir, err := os.Getwd() if err != nil { - fmt.Fprintf(os.Stderr, "%s\n", err) + fmt.Fprintf(os.Stderr, "getting current directory: %s\n", err) } os.Setenv("OLDPWD", dir) @@ -304,7 +304,7 @@ func main() { case 0: _, err := os.Getwd() if err != nil { - fmt.Fprintf(os.Stderr, "%s\n", err) + fmt.Fprintf(os.Stderr, "getting current directory: %s\n", err) os.Exit(2) } case 1: