add missing error contexts for getwd calls
This commit is contained in:
parent
25476e79ef
commit
07b35def77
4
main.go
4
main.go
@ -67,7 +67,7 @@ func exportEnvVars() {
|
|||||||
|
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%s\n", err)
|
fmt.Fprintf(os.Stderr, "getting current directory: %s\n", err)
|
||||||
}
|
}
|
||||||
os.Setenv("OLDPWD", dir)
|
os.Setenv("OLDPWD", dir)
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ func main() {
|
|||||||
case 0:
|
case 0:
|
||||||
_, err := os.Getwd()
|
_, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%s\n", err)
|
fmt.Fprintf(os.Stderr, "getting current directory: %s\n", err)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user