Skip to content

Commit f82d778

Browse files
committed
Look for executable extensions on Windows.
1 parent 57ae9ad commit f82d778

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cachebin/cachebin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ def call(self, command: str, *args: str) -> str:
135135
Returns:
136136
str: The output of the command.
137137
"""
138+
if self.parent._system == "windows":
139+
binary_path_exe = self.binary_directory_path / "{command}.exe"
140+
binary_path_bat = self.binary_directory_path / "{command}.bat"
141+
if binary_path_exe.exists():
142+
command = f"{command}.exe"
143+
elif binary_path_bat.exists():
144+
command = f"{command}.bat"
138145
binary_path = self.binary_directory_path / command
139146
if not binary_path.exists():
140147
raise FileNotFoundError(f"Binary {binary_path} does not exist.")

0 commit comments

Comments
 (0)