Skip to content

Commit 03c7145

Browse files
authored
fix: handle windows requirements (#20)
prepend with "file://" if on windows. Addresses #19
1 parent f7b53b6 commit 03c7145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ async function loadAllTools(): Promise<ToolModule[]> {
5151
for (const file of toolFiles) {
5252
try {
5353
const toolPath = join(toolsDir, file);
54-
const toolModule = await import(toolPath);
54+
// If the OS is windows, prepend 'file://' to the path
55+
const isWindows = process.platform === 'win32';
56+
const toolModule = await import(isWindows ? `file://${toolPath}`: toolPath);
5557

5658
if (
5759
toolModule.method &&

0 commit comments

Comments
 (0)