diff --git a/build-api.hxml b/build-api.hxml index 58d1392..97ef841 100644 --- a/build-api.hxml +++ b/build-api.hxml @@ -3,6 +3,4 @@ libs.hxml -D analyzer-optimize -cp tools --main tools.ReadNvimApi - ---interp +--run tools.ReadNvimApi diff --git a/tools/ReadNvimApi.hx b/tools/ReadNvimApi.hx index 844a913..ad4d5b5 100644 --- a/tools/ReadNvimApi.hx +++ b/tools/ReadNvimApi.hx @@ -305,13 +305,19 @@ class ReadNvimApi { } static function main() { - final tmpDir = switch (getTmpDir("nvim-api")) { - case Ok(dirPath): - Sys.println('Using $dirPath as temp folder'); - dirPath; - case Error(msg): - Sys.println('Failed getting temp dir: $msg'); - throw "TMP_DIR_FAIL"; + final tmpDir = switch (Sys.args()) { + case ['--path', path]: + Log.print2('Got path: ', path); + path; + case _: + switch (getTmpDir("nvim-api")) { + case Ok(dirPath): + Sys.println('Using $dirPath as temp folder'); + dirPath; + case Error(msg): + Sys.println('Failed getting temp dir: $msg'); + throw "TMP_DIR_FAIL"; + } } switch (GitRepo.clone(luadevRepo, tmpDir)) { case Ok(output):