aboutsummaryrefslogtreecommitdiff
path: root/src/server/check.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-12-26 21:01:44 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2021-12-26 21:01:44 +0100
commitc2ae4fa39744087ca34f6201dcf0e5707eb2758d (patch)
treed7766740c4c6387f92f00f23eb93216dd8edbe56 /src/server/check.odin
parentcc0415c049f9bff9a13acc67256552a782f3fd7a (diff)
Add odin_command config
Diffstat (limited to 'src/server/check.odin')
-rw-r--r--src/server/check.odin12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/check.odin b/src/server/check.odin
index 5ff91d8..f38307c 100644
--- a/src/server/check.odin
+++ b/src/server/check.odin
@@ -36,7 +36,15 @@ when ODIN_OS == "windows" {
strings.write_string(&collection_builder, fmt.aprintf("-collection:%v=%v ", k, v));
}
- if code, ok, buffer = common.run_executable(fmt.tprintf("odin check %s %s -no-entry-point", path.dir(uri.path, context.temp_allocator), strings.to_string(collection_builder)), &data); !ok {
+ command: string;
+
+ if common.config.odin_command != "" {
+ command = common.config.odin_command;
+ } else {
+ command = "aodin";
+ }
+
+ if code, ok, buffer = common.run_executable(fmt.tprintf("%v check %s %s -no-entry-point", path.dir(uri.path, context.temp_allocator), strings.to_string(collection_builder)), &data); !ok {
log.errorf("Odin check failed with code %v for file %v", code, uri.path);
return;
}
@@ -211,8 +219,6 @@ when ODIN_OS == "windows" {
send_notification(notifaction, writer);
}
}
-
-
}
} else {
check :: proc(uri: common.Uri, writer: ^Writer) {