aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers/shell.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/installers/shell.lua')
-rw-r--r--lua/nvim-lsp-installer/installers/shell.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua
index 8cb263ef..2d0ccf6f 100644
--- a/lua/nvim-lsp-installer/installers/shell.lua
+++ b/lua/nvim-lsp-installer/installers/shell.lua
@@ -29,7 +29,21 @@ function M.bash(raw_script, opts)
opts = vim.tbl_deep_extend("force", default_opts, opts or {})
return shell {
- shell = "/bin/bash",
+ shell = "bash",
+ cmd = (opts.prefix or "") .. raw_script,
+ env = opts.env,
+ }
+end
+
+function M.sh(raw_script, opts)
+ local default_opts = {
+ prefix = "set -euo pipefail;",
+ env = {},
+ }
+ opts = vim.tbl_deep_extend("force", default_opts, opts or {})
+
+ return shell {
+ shell = "sh",
cmd = (opts.prefix or "") .. raw_script,
env = opts.env,
}