fix: support Windows launcher import paths

This commit is contained in:
Vasanthdev2004
2026-04-01 12:43:14 +05:30
parent 2d7aa9c841
commit 4ce7dcf91e
3 changed files with 22 additions and 1 deletions

View File

@@ -10,12 +10,13 @@
import { existsSync } from 'fs'
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import { getDistImportSpecifier } from './import-specifier.mjs'
const __dirname = dirname(fileURLToPath(import.meta.url))
const distPath = join(__dirname, '..', 'dist', 'cli.mjs')
if (existsSync(distPath)) {
await import(distPath)
await import(getDistImportSpecifier(__dirname))
} else {
console.error(`
openclaude: dist/cli.mjs not found.