Skip to content

Commit 03ddc32

Browse files
fix:terminal_toolkit windows (camel-ai#1807)
Co-authored-by: Wendong-Fan <[email protected]>
1 parent 578dae2 commit 03ddc32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

camel/toolkits/terminal_toolkit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def file_find_by_name(self, path: str, glob: str) -> str:
117117
else: # Windows
118118
# For Windows, we use dir command with /s for recursive search
119119
# and /b for bare format
120-
121120
pattern = glob
122-
command.extend(["dir", "/s", "/b", os.path.join(path, pattern)])
121+
file_path = os.path.join(path, pattern).replace('/', '\\')
122+
command.extend(["cmd", "/c", "dir", "/s", "/b", file_path])
123123

124124
try:
125125
result = subprocess.run(

0 commit comments

Comments
 (0)