Skip to content

Commit 90ed14d

Browse files
committed
[build-script] Ensure executable is file, not directory
1 parent 4ebfc08 commit 90ed14d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/swift_build_support/swift_build_support/arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def type_executable(string):
9393
9494
Convert it to absolute path.
9595
"""
96-
if os.access(string, os.X_OK):
96+
if os.path.isfile(string) and os.access(string, os.X_OK):
9797
return os.path.abspath(string)
9898
raise argparse.ArgumentTypeError(
9999
"%r is not executable" % string)

0 commit comments

Comments
 (0)