Skip to content

Commit ed85e10

Browse files
committed
Add additional check on EACCES on Linux when considering possible paths
EACCES can be something that comes back from execve() for reasons related to permissions, or file type. Instead of failing due to the underlying error, just continue to the next possible path.
1 parent 76ca132 commit ed85e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Subprocess/Platforms/Subprocess+Linux.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extension Configuration {
107107
}
108108
// Spawn error
109109
if spawnError != 0 {
110-
if spawnError == ENOENT {
110+
if spawnError == ENOENT || spawnError == EACCES {
111111
// Move on to another possible path
112112
continue
113113
}

0 commit comments

Comments
 (0)