Skip to content

Commit

Permalink
feat: read dest path for neodev
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed May 1, 2023
1 parent 2440a16 commit 07ee21b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 1 addition & 3 deletions build-api.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ libs.hxml
-D analyzer-optimize

-cp tools
-main tools.ReadNvimApi

--interp
--run tools.ReadNvimApi
20 changes: 13 additions & 7 deletions tools/ReadNvimApi.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 07ee21b

Please sign in to comment.