HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.19k stars 656 forks source link

Sys.command / sys.io.Process don't seem to use same env as cmd #8193

Closed mundusnine closed 5 years ago

mundusnine commented 5 years ago

Env:

In cmd: image

In Sys.command/ sys.io.Process: image

For context: I am trying to get the path to a library installed with haxelib within that library( that I am developing).I want the library to have an image that will be added to the projects using it.

Gama11 commented 5 years ago

Hashlink 1.9(only used for debugging because the library uses macro target)

Fyi, the macro target has debugging support too. :) https://github.com/vshaxe/vshaxe/wiki/Debugging

mundusnine commented 5 years ago

Upon further testing; When I set Sys.command("haxelib setup path/to/my/libs") it fixed the issue. But I think the issue should not be present from the get go; Because logically, if cmd.exe is using a haxelib with the right config why does the Sys.command/haxe.io.Process use a haxelib with a different config ?

This could be an issue with haxelib but Sys.command/haxe.io.Process does not function in a logical manner with other commands.

For example, when trying to call Sys.command("scoop install haxe-dev"), the command process returns that the manifest is not present; while in cmd.exe scoop install haxe-dev has the manifest without issue.

RealyUniqueName commented 5 years ago

That may be caused by the settings of your OS. What happens if you run your program in the same terminal, where you run haxelib config?

ncannasse commented 5 years ago

I'm not sure I understand the first screenshot. on windows the syntax to display an env var is echo %HAXE_LIBRARY_PATH%, $ is Linux syntax

ncannasse commented 5 years ago

Closing due to lack of feedback.