Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix 'haxelib path lib' for lix-pm installs #17

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/hxp/Haxelib.hx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Haxelib
var cacheDryRun = System.dryRun;
System.dryRun = false;

output = Haxelib.runProcess(workingDirectory, ["path", name], true, true, true);
output = Haxelib.runProcess(workingDirectory, ["path", name], true, true, true, false, false, true);
if (output == null) output = "";

System.dryRun = cacheDryRun;
Expand Down Expand Up @@ -432,7 +432,7 @@ class Haxelib
}

public static function runProcess(path:String, args:Array<String>, waitForOutput:Bool = true, safeExecute:Bool = true, ignoreErrors:Bool = false,
print:Bool = false, returnErrorValue:Bool = false):String
print:Bool = false, returnErrorValue:Bool = false, allowNonExecutables:Bool = false):String
{
if (pathOverrides.exists("haxelib"))
{
Expand All @@ -443,7 +443,7 @@ class Haxelib
Log.error("Cannot find haxelib script: " + script);
}

return System.runProcess(path, "neko", [script].concat(args), waitForOutput, safeExecute, ignoreErrors, print, returnErrorValue);
return System.runProcess(path, "neko", [script].concat(args), waitForOutput, safeExecute, ignoreErrors, print, returnErrorValue, allowNonExecutables);
}
else
{
Expand All @@ -456,7 +456,7 @@ class Haxelib

// }

return System.runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, print, returnErrorValue);
return System.runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, print, returnErrorValue, allowNonExecutables);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/hxp/System.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ class System
}

public static function runProcess(path:String, command:String, args:Array<String>, waitForOutput:Bool = true, safeExecute:Bool = true,
ignoreErrors:Bool = false, print:Bool = false, returnErrorValue:Bool = false):String
ignoreErrors:Bool = false, print:Bool = false, returnErrorValue:Bool = false, allowNonExecutables = false):String
{
if (print)
{
Expand Down Expand Up @@ -1113,7 +1113,7 @@ class System
Log.error("The specified target path \"" + path + "\" does not exist");
}

return _runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, returnErrorValue);
return _runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, returnErrorValue, allowNonExecutables);
}
catch (e:Dynamic)
{
Expand All @@ -1127,12 +1127,12 @@ class System
}
else
{
return _runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, returnErrorValue);
return _runProcess(path, command, args, waitForOutput, safeExecute, ignoreErrors, returnErrorValue, allowNonExecutables);
}
}

private static function _runProcess(path:String, command:String, args:Array<String>, waitForOutput:Bool, safeExecute:Bool, ignoreErrors:Bool,
returnErrorValue:Bool):String
returnErrorValue:Bool, allowNonExecutables:Bool):String
{
var oldPath:String = "";

Expand Down Expand Up @@ -1168,7 +1168,7 @@ class System

if (!dryRun)
{
var process = new Process(command, args);
var process = allowNonExecutables ? new Process(command + " " + args.join(" ")) : new Process(command, args);
var buffer = new BytesOutput();

if (waitForOutput)
Expand Down