diff options
| author | William Boman <william@redwill.se> | 2022-08-02 18:35:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-02 18:35:40 +0200 |
| commit | 546d81893bd3d8c3c817bd9c3ec26a0760215500 (patch) | |
| tree | aeb2f603424ecb2e282ac10d9288d60b49a0febf /lua/mason-core | |
| parent | chore: update issue templates (#230) (diff) | |
| download | mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar.gz mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar.bz2 mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar.lz mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar.xz mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.tar.zst mason-546d81893bd3d8c3c817bd9c3ec26a0760215500.zip | |
feat(debugpy): write executable for convenient access (#229)
Diffstat (limited to 'lua/mason-core')
| -rw-r--r-- | lua/mason-core/installer/context.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/mason-core/installer/context.lua b/lua/mason-core/installer/context.lua index 93d45a8a..89226f94 100644 --- a/lua/mason-core/installer/context.lua +++ b/lua/mason-core/installer/context.lua @@ -213,6 +213,21 @@ function InstallContext:write_node_exec_wrapper(new_executable_rel_path, script_ end ---@param new_executable_rel_path string: Relative path to the executable file to create. +---@param module string: The python module to call. +function InstallContext:write_pyvenv_exec_wrapper(new_executable_rel_path, module) + return self:write_shell_exec_wrapper( + new_executable_rel_path, + ("%q -m %s"):format( + path.concat { + require("mason-core.managers.pip3").venv_path(self.package:get_install_path()), + "python", + }, + module + ) + ) +end + +---@param new_executable_rel_path string: Relative path to the executable file to create. ---@param target_executable_rel_path string function InstallContext:write_exec_wrapper(new_executable_rel_path, target_executable_rel_path) return self:write_shell_exec_wrapper( |
