diff options
| author | William Boman <william@redwill.se> | 2023-10-11 17:00:26 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2025-02-19 09:23:19 +0100 |
| commit | 3ed9abe2660b1afda08add3396f59ef01d4f4b06 (patch) | |
| tree | e07423ffc10057a0f9590435607cf1502f22b14f | |
| parent | refactor!: refactor installer internals and add new Package class methods (#1... (diff) | |
| download | mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar.gz mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar.bz2 mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar.lz mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar.xz mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.tar.zst mason-3ed9abe2660b1afda08add3396f59ef01d4f4b06.zip | |
chore(compilers): remove default environment from github build compiler
3 files changed, 5 insertions, 11 deletions
diff --git a/lua/mason-core/installer/compiler/compilers/github/build.lua b/lua/mason-core/installer/compiler/compilers/github/build.lua index 22f3e3cc..77c3627f 100644 --- a/lua/mason-core/installer/compiler/compilers/github/build.lua +++ b/lua/mason-core/installer/compiler/compilers/github/build.lua @@ -19,13 +19,7 @@ function M.parse(source, purl, opts) local expr_ctx = { version = purl.version } - -- TODO: In a few releases of the core registry, r-languageserver reads $MASON_VERSION directly. Remove this - -- some time in the future. - local default_env = { - MASON_VERSION = purl.version, - } - build_instruction.env = - vim.tbl_extend("force", default_env, try(expr.tbl_interpolate(build_instruction.env or {}, expr_ctx))) + build_instruction.env = try(expr.tbl_interpolate(build_instruction.env or {}, expr_ctx)) ---@class ParsedGitHubBuildSource : ParsedPackageSource local parsed_source = { diff --git a/tests/mason-core/installer/registry/compilers/github/build_spec.lua b/tests/mason-core/installer/registry/compilers/github/build_spec.lua index 0adc00fe..82271fee 100644 --- a/tests/mason-core/installer/registry/compilers/github/build_spec.lua +++ b/tests/mason-core/installer/registry/compilers/github/build_spec.lua @@ -17,7 +17,7 @@ describe("github provider :: build :: parsing", function() Result.success { build = { run = [[npm install && npm run compile]], - env = { MASON_VERSION = "2023-03-09" }, + env = {}, }, repo = "https://github.com/namespace/name.git", rev = "2023-03-09", @@ -36,7 +36,7 @@ describe("github provider :: build :: parsing", function() build = { target = "win_x64", run = [[npm install]], - env = { MASON_VERSION = "2023-03-09" }, + env = {}, }, repo = "https://github.com/namespace/name.git", rev = "2023-03-09", diff --git a/tests/mason-core/installer/registry/compilers/github/release_spec.lua b/tests/mason-core/installer/registry/compilers/github/release_spec.lua index 3cfbabc5..7ea9f42e 100644 --- a/tests/mason-core/installer/registry/compilers/github/release_spec.lua +++ b/tests/mason-core/installer/registry/compilers/github/release_spec.lua @@ -158,7 +158,7 @@ describe("github provider :: release :: parsing", function() Result.success { build = { run = [[npm install && npm run compile]], - env = { MASON_VERSION = "2023-03-09" }, + env = {}, }, repo = "https://github.com/namespace/name.git", rev = "2023-03-09", @@ -177,7 +177,7 @@ describe("github provider :: release :: parsing", function() build = { target = "win_x64", run = [[npm install]], - env = { MASON_VERSION = "2023-03-09" }, + env = {}, }, repo = "https://github.com/namespace/name.git", rev = "2023-03-09", |
