Skip to content

Commit 1adfdb7

Browse files
committed
execabs: isGo119ErrDot: use errors.Is instead of string-matching
Addresses the TODO added in CL 403256. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent fc697a3 commit 1adfdb7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

execabs/execabs_go119.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
package execabs
99

10-
import "strings"
10+
import (
11+
"errors"
12+
"os/exec"
13+
)
1114

1215
func isGo119ErrDot(err error) bool {
13-
// TODO: return errors.Is(err, exec.ErrDot)
14-
return strings.Contains(err.Error(), "current directory")
16+
return errors.Is(err, exec.ErrDot)
1517
}

0 commit comments

Comments
 (0)