Skip to content

Commit

Permalink
fix(pypi): also provide install_extra_args to pypi.install (#1263)
Browse files Browse the repository at this point in the history
Closes #1224.
  • Loading branch information
williamboman committed Apr 26, 2023
1 parent ca57774 commit 646ef07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/mason-core/installer/registry/providers/pypi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function M.install(ctx, source)
try(pypi.install(source.package, source.version, {
extra = source.extra,
extra_packages = source.extra_packages,
install_extra_args = source.pip.extra_args,
}))
end)
end
Expand Down
6 changes: 5 additions & 1 deletion tests/mason-core/installer/registry/providers/pypi_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ describe("pypi provider :: installing", function()
install_extra_args = { "--proxy", "http://localghost" },
}
assert.spy(manager.install).was_called(1)
assert.spy(manager.install).was_called_with("package", "1.5.0", { extra = "lsp", extra_packages = { "extra" } })
assert.spy(manager.install).was_called_with(
"package",
"1.5.0",
{ extra = "lsp", extra_packages = { "extra" }, install_extra_args = { "--proxy", "http://localghost" } }
)
settings.set(settings._DEFAULT_SETTINGS)
end)

Expand Down

0 comments on commit 646ef07

Please sign in to comment.