Skip to content

Commit 61f2c20

Browse files
committed
Run Script: fix working directory handling
Previously, "haxelib run flixel tools configure ." wouldn't work correctly (it would add the files to flixel itself rather the the cwd). Also pass on the exit code.
1 parent a839483 commit 61f2c20

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

run.n

519 Bytes
Binary file not shown.

script/.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"haxe.displayConfigurations": [
3+
["build.hxml"]
4+
]
5+
}

script/.vscode/tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0.0",
3+
"command": "haxe",
4+
"args": ["build.hxml"],
5+
"problemMatcher": {
6+
"owner": "haxe",
7+
"pattern": {
8+
"regexp": "^(.+):(\\d+): (?:lines \\d+-(\\d+)|character(?:s (\\d+)-| )(\\d+)) : (?:(Warning) : )?(.*)$",
9+
"file": 1,
10+
"line": 2,
11+
"endLine": 3,
12+
"column": 4,
13+
"endColumn": 5,
14+
"severity": 6,
15+
"message": 7
16+
}
17+
}
18+
}

script/RunScript.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ class RunScript
88
public static function main()
99
{
1010
var args = Sys.args();
11-
args.pop(); // working directory path
12-
Sys.command("haxelib", ["run", "flixel-tools"].concat(args));
11+
var cwd = args.pop();
12+
Sys.setCwd(cwd);
13+
Sys.exit(Sys.command("haxelib", ["run", "flixel-tools"].concat(args)));
1314
}
1415
}

0 commit comments

Comments
 (0)