on runtime python, also use assertProcess for convertToHscript()
This commit is contained in:
@@ -368,11 +368,11 @@ class Prelude {
|
|||||||
* So don't use raw string literals in Kiss you want parsed and evaluated at runtime.
|
* So don't use raw string literals in Kiss you want parsed and evaluated at runtime.
|
||||||
*/
|
*/
|
||||||
public static function convertToHScript(kissStr:String):String {
|
public static function convertToHScript(kissStr:String):String {
|
||||||
#if (!macro && hxnodejs)
|
#if (!macro && (hxnodejs || python))
|
||||||
var kissProcess = ChildProcess.spawnSync("haxelib", ["run", "kiss", "convert", "--all", "--hscript"], {input: '${kissStr}\n'});
|
var hscript = try {
|
||||||
if (kissProcess.status != 0) {
|
assertProcess("haxelib", ["run", "kiss", "convert", "--all", "--hscript"], kissStr.split('\n'));
|
||||||
var error:Buffer = kissProcess.stderr;
|
} catch (e) {
|
||||||
throw 'failed to convert ${kissStr} to hscript: ${error.toString()}';
|
throw 'failed to convert ${kissStr} to hscript:\n$e';
|
||||||
}
|
}
|
||||||
var output:Buffer = kissProcess.stdout;
|
var output:Buffer = kissProcess.stdout;
|
||||||
return output.toString();
|
return output.toString();
|
||||||
|
Reference in New Issue
Block a user