Skip to content

Commit

Permalink
added quotes for Windows paths with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Oct 22, 2024
1 parent 39a6c1d commit 9fac603
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion eval-debugger
Submodule eval-debugger updated 1 files
+12 −1 src/Main.hx
2 changes: 2 additions & 0 deletions src/vshaxe/configuration/HaxeExecutable.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vshaxe.configuration;
import haxe.DynamicAccess;
import haxe.extern.EitherType;
import haxe.io.Path;
import haxeLanguageServer.ProcessUtil.shellEscapeCommand;
import js.node.Buffer;
import js.node.ChildProcess;
import sys.FileSystem;
Expand Down Expand Up @@ -108,6 +109,7 @@ class HaxeExecutable extends ConfigurationWrapper<HaxeExecutableConfiguration> {
}
}
}
executable = shellEscapeCommand(executable);

configuration = {
executable: executable,
Expand Down
4 changes: 3 additions & 1 deletion src/vshaxe/configuration/HaxeInstallation.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vshaxe.configuration;
import haxe.DynamicAccess;
import haxe.Timer;
import haxe.io.Path;
import haxeLanguageServer.ProcessUtil.shellEscapeCommand;
import sys.FileSystem;
import vshaxe.helper.PathHelper;
import vshaxe.helper.ProcessHelper;
Expand Down Expand Up @@ -189,7 +190,8 @@ class HaxeInstallation {
}

function getLibraryBasePath():Null<String> {
final output = getProcessOutput('${haxelib.configuration.executable} config')[0];
final haxelibExe = shellEscapeCommand(haxelib.configuration.executable);
final output = getProcessOutput('$haxelibExe config')[0];
return if (output == null) {
trace("`haxelib config` call failed, Haxe Dependencies won't be populated.");
null;
Expand Down
3 changes: 2 additions & 1 deletion src/vshaxe/helper/HaxeConfiguration.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vshaxe.helper;
import haxe.Json;
import haxe.ds.ReadOnlyArray;
import haxe.io.Path;
import haxeLanguageServer.ProcessUtil.shellEscapeCommand;
import js.lib.Promise;
import sys.FileSystem;
import sys.io.File;
Expand Down Expand Up @@ -292,7 +293,7 @@ class HaxeConfiguration {

function resolveHaxelibs(libs:ReadOnlyArray<String>):Array<String> {
final hxml = [];
final haxelib = haxeInstallation.haxelib.configuration.executable;
final haxelib = shellEscapeCommand(haxeInstallation.haxelib.configuration.executable);
final output = getProcessOutput('$haxelib path ${libs.join(" ")}');
for (line in output) {
line = line.trim();
Expand Down

0 comments on commit 9fac603

Please sign in to comment.