Skip to content

Commit

Permalink
prevent scripts from loading if clink is too old
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jun 16, 2023
1 parent 8285790 commit d44b0bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/more_clink_completions/Main.hx
Expand Up @@ -6,11 +6,18 @@
*/
package more_clink_completions;

import clink.api.Clink;
import more_clink_completions.util.Macros;

class Main {

static function main():Void {
final clinkVersion = Clink.versionMajor * 1000000 + Clink.versionMinor * 1000 + Clink.versionPatch;
if (clinkVersion < 1004024 /*1.004.024*/) {
Sys.println("WARNING: Clink version too old! more-clinks-completions requires clink 1.4.24 or higher.");
return;
}

Macros.registerCommandCompletions();

#if register_dummy_command
Expand Down

0 comments on commit d44b0bc

Please sign in to comment.