File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ import { WebSocketServer } from 'ws'
33import { toSocket , WebSocketMessageReader , WebSocketMessageWriter } from 'vscode-ws-jsonrpc'
44import { StreamMessageReader , StreamMessageWriter } from 'vscode-jsonrpc/node.js'
55import { readFileSync , writeFileSync , existsSync } from 'fs'
6- import path , { join } from 'path'
6+ import path , { dirname , join } from 'path'
7+ import { fileURLToPath } from 'url'
8+
79import 'dotenv/config'
810
9- // Get the directory where the binary is executed from
10- // Use process.cwd() for pkg compatibility (node_modules is external )
11- const __dirname = process . cwd ( )
11+ // Get the directory where bundle.js is located (not cwd)
12+ const __filename = fileURLToPath ( import . meta . url )
13+ const __dirname = dirname ( __filename )
1214
1315// Parse command-line arguments
1416function parseArgs ( ) {
You can’t perform that action at this time.
0 commit comments