From bd4d9838d916c274e0b6002159d714095b68ee51 Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Sat, 17 Aug 2024 01:30:29 +0200 Subject: [PATCH 1/2] added shell=true parameter to spawnSync calls --- .haxerc | 2 +- src/Main.hx | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.haxerc b/.haxerc index 7140546..ef43126 100644 --- a/.haxerc +++ b/.haxerc @@ -1,4 +1,4 @@ { - "version": "4.2.5", + "version": "4.3.6", "resolveLibs": "scoped" } \ No newline at end of file diff --git a/src/Main.hx b/src/Main.hx index c83b5d5..329d562 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -1,4 +1,3 @@ -import Protocol; import haxe.DynamicAccess; import js.node.Buffer; import js.node.ChildProcess; @@ -6,6 +5,7 @@ import js.node.Net; import js.node.child_process.ChildProcess.ChildProcessEvent; import js.node.net.Socket.SocketEvent; import js.node.stream.Readable.ReadableEvent; +import Protocol; import vscode.debugProtocol.DebugProtocol; using Lambda; @@ -83,7 +83,7 @@ class Main extends vscode.debugAdapter.DebugSession { return false; } - final versionCheck = ChildProcess.spawnSync(haxe, ["-version"], {env: env, cwd: cwd}); + final versionCheck = ChildProcess.spawnSync(haxe, ["-version"], {env: env, cwd: cwd, shell: true}); var output = (versionCheck.stderr : Buffer).toString().trim(); if (output == "") output = (versionCheck.stdout : Buffer).toString().trim(); // haxe 4.0 prints -version output to stdout instead @@ -140,7 +140,12 @@ class Main extends vscode.debugAdapter.DebugSession { server.listen(0, function() { final port = server.address().port; final haxeArgs = ["--cwd", cwd, "-D", 'eval-debugger=127.0.0.1:$port'].concat(haxeArgs); - final haxeProcess = ChildProcess.spawn(haxe, haxeArgs, {stdio: Pipe, env: env, cwd: cwd}); + final haxeProcess = ChildProcess.spawn(haxe, haxeArgs, { + stdio: Pipe, + env: env, + cwd: cwd, + shell: true + }); haxeProcess.stdout.on(ReadableEvent.Data, onStdout); haxeProcess.stderr.on(ReadableEvent.Data, onStderr); haxeProcess.on(ChildProcessEvent.Exit, (_, _) -> exit()); From bf6d987608068749b5bf2cea4929f827192185ff Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Sat, 17 Aug 2024 01:32:22 +0200 Subject: [PATCH 2/2] updated hxnodejs lib --- haxe_libraries/hxnodejs.hxml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haxe_libraries/hxnodejs.hxml b/haxe_libraries/hxnodejs.hxml index c075488..b498204 100644 --- a/haxe_libraries/hxnodejs.hxml +++ b/haxe_libraries/hxnodejs.hxml @@ -1,5 +1,5 @@ -# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib --cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src +# @install: lix --silent download "haxelib:/hxnodejs#12.2.0" into hxnodejs/12.2.0/haxelib +-cp ${HAXE_LIBCACHE}/hxnodejs/12.2.0/haxelib/src -D hxnodejs=12.1.0 --macro allowPackage('sys') # should behave like other target defines and not be defined in macro context