Skip to content

[Neko] Sys.programPath() with neko booted executables #5708

@Yanrishatum

Description

@Yanrishatum

Sys.programPath() returns incorrect path to neko modules that are booted with nekotools boot command. It is expected that function return path to booted executable, but instead it returns path executable folder + .n. Sys.executablePath provided as comparsion.
Tested on haxe_2016-09-21_development_3df5463.tar.gz.
Test results:

// neko programpath.n
Sys.programPath()    = C:\_temp\programpath\programpath.n
Sys.executablePath() = E:\HaxeToolkit\neko\neko.exe
// nekotools boot programpath.n
// programpath.exe
Sys.programPath()    = C:\_temp\programpath\.n
Sys.executablePath() = C:\_temp\programpath\programpath.exe
// cpp version for comparsion:
Sys.programPath()    = C:\_temp\programpath\ProgramPath_cpp.exe
Sys.executablePath() = C:\_temp\programpath\ProgramPath_cpp.exe

Reproduction code:

class ProgramPath
{
  public static function main():Void
  {
    Sys.println("Sys.programPath()    = " + Sys.programPath());
    Sys.println("Sys.executablePath() = " + Sys.executablePath());
  }
}

Build.hxml:

ProgramPath.hx
-main ProgramPath
-neko programpath.n
-cmd nekotools boot programpath.n

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions