From b6dd98dac301c5a993cf469ffb27c1d99eae775a Mon Sep 17 00:00:00 2001 From: Kevin Heidt Date: Wed, 30 Jul 2025 16:43:31 -0400 Subject: [PATCH] Handle windows requirements prepend with "file://" if on windows. Addresses #19 --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9cbb25e..1ea6f46 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,7 +51,9 @@ async function loadAllTools(): Promise { for (const file of toolFiles) { try { const toolPath = join(toolsDir, file); - const toolModule = await import(toolPath); + // If the OS is windows, prepend 'file://' to the path + const isWindows = process.platform === 'win32'; + const toolModule = await import(isWindows ? `file://${toolPath}`: toolPath); if ( toolModule.method &&