diff --git a/lua/ht/version.lua b/lua/ht/version.lua index f646d31a..910a58ea 100644 --- a/lua/ht/version.lua +++ b/lua/ht/version.lua @@ -1,5 +1,5 @@ local M = {} -M.last_updated_time = '2024.02.10' +M.last_updated_time = '2024.02.12' return M diff --git a/src/core/model/ext_tool.ts b/src/core/model/ext_tool.ts index ac3e4e3a..5b2c2e23 100644 --- a/src/core/model/ext_tool.ts +++ b/src/core/model/ext_tool.ts @@ -16,7 +16,7 @@ export interface LocalToolOpt { /** * Absolute path of tool. */ - command: string[]; + command: string[] | (() => any); } export interface AbsolutePathToolOpt { @@ -68,6 +68,9 @@ class ExternalTools implements ExternalToolsOpt { return this.name; } if ("command" in this.exe) { + if (typeof this.exe.command === "function") { + return this.exe.command(); + } return this.exe.command.join(" "); } else if ("masonPkg" in this.exe) { return `${HttsContext.getInstance().masonBinRoot}/${this.exe.masonPkg}`;