diff options
| author | William Boman <william@redwill.se> | 2021-12-05 14:03:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 14:03:37 +0100 |
| commit | 0c69c52fc6462e42b5fdadceaf919763c8e04e8d (patch) | |
| tree | d12299a272fba285874bb6c4b8fb89e46233950b /lua | |
| parent | scripts/autogen_metadata: directly import server config from lspconfig (diff) | |
| download | mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar.gz mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar.bz2 mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar.lz mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar.xz mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.tar.zst mason-0c69c52fc6462e42b5fdadceaf919763c8e04e8d.zip | |
fix(installers/shell): pass script via arg, when possible (#307)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/installers/shell.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua index 34cfc524..62506155 100644 --- a/lua/nvim-lsp-installer/installers/shell.lua +++ b/lua/nvim-lsp-installer/installers/shell.lua @@ -16,7 +16,7 @@ local function shell(opts) }), }, callback) - if stdio then + if stdio and opts.cmd then local stdin = stdio[1] stdin:write(opts.cmd) @@ -37,7 +37,7 @@ function M.bash(raw_script, opts) return shell { shell = "bash", - cmd = (opts.prefix or "") .. raw_script, + args = { "-c", (opts.prefix or "") .. raw_script }, env = opts.env, } end @@ -68,7 +68,7 @@ function M.cmd(raw_script, opts) return shell { shell = "cmd.exe", - cmd = raw_script, + args = { "/C", raw_script }, env = opts.env, } end @@ -85,8 +85,7 @@ function M.powershell(raw_script, opts) return shell { shell = "powershell.exe", - args = { "-NoProfile" }, - cmd = (opts.prefix or "") .. raw_script, + args = { "-NoProfile", "-Command", (opts.prefix or "") .. raw_script }, env = opts.env, } end |
