diff --git a/src/app/CommandManager.ts b/src/app/CommandManager.ts index 2ff571b..adc1ded 100644 --- a/src/app/CommandManager.ts +++ b/src/app/CommandManager.ts @@ -57,12 +57,16 @@ class CommandManager { for (const file of files) { const ext = path.extname(file); const commandName = path.basename(file, ext); - const commandPath = path.join(commandsDir, file); + let commandPath = path.join(commandsDir, file); + + console.log(commandPath); if (os.platform() === 'win32') { - const commandPath = path.join(commandsDir, file).replace(/\\/g, '/'); + commandPath = path.join(commandsDir, file).replace(/\\/g, '/'); } + console.log(commandPath); + const module = await import(commandPath); this.registerCommand(commandName, module.default); }