Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tool/src/massive/munit/command/RunCommand.hx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class RunCommand extends MUnitCommand
{
var errors:Array<String> = new Array();

FileSys.setCwd(console.originalDir.nativePath);
FileSys.setCwd(console.dir.nativePath);
var serverExitCode:Int = 0;

tmpDir = File.current.resolveDirectory("tmp");
Expand Down Expand Up @@ -490,18 +490,26 @@ class RunCommand extends MUnitCommand
var targetLocation:String = HTTPClient.DEFAULT_SERVER_URL + "/tmp/runner/" + file.fileName;
var parameters:Array<String> = [];

// See http://www.dwheeler.com/essays/open-files-urls.html
if (FileSys.isWindows)
{
parameters.push("start");
if (browser != null)
parameters.push(browser);
}
else
else if (FileSys.isMac)
{
parameters.push("open");
if (browser != null)
parameters.push("-a " + browser);
}
else if (FileSys.isLinux)
{
if (browser != null)
parameters.push(browser);
else
parameters.push("xdg-open");
}

parameters.push(targetLocation);

Expand Down