add missing error contexts for getwd calls

This commit is contained in:
Gokcehan committed 2022-03-06 18:46:53 +03:00
1 parent 25476e79ef
commit 07b35def77
1 file changed
+2 -2
+2 -2
View File
@@ -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: