diff options
author | Adrian Nadau Semb <[email protected]> | 2022-02-02 23:59:25 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-03 11:29:25 +0330 |
commit | fb2f405db473e0d3de03871bcc14adc49359ebc5 (patch) | |
tree | 4c479e32ead24ec4183b30a1d2aab75600f9513b /utils/installer/install.ps1 | |
parent | 8398a3f3ea13d6c5f90d60c291aa98ca4c248689 (diff) |
[Bugfix]: added -ScriptBlock to run commands ```install.ps1``` (#2188)
* fix(installer): use script-block to run commands
* fix(installer): enforce v7 as erroraction break is not supported in v5
Diffstat (limited to 'utils/installer/install.ps1')
-rw-r--r-- | utils/installer/install.ps1 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1 index 0823032a..526239bb 100644 --- a/utils/installer/install.ps1 +++ b/utils/installer/install.ps1 @@ -1,3 +1,4 @@ +#Requires -Version 7.1 $ErrorActionPreference = "Stop" # exit when command fails # set script variables @@ -139,9 +140,10 @@ function check_system_deps() { } function install_nodejs_deps() { + $dep = "node" try { - check_system_dep "node" - Invoke-Command npm install -g neovim tree-sitter-cli -ErrorAction Break + check_system_dep "$dep" + Invoke-Command -ScriptBlock { npm install --global neovim tree-sitter-cli } -ErrorAction Break } catch { print_missing_dep_msg "$dep" @@ -149,9 +151,10 @@ function install_nodejs_deps() { } function install_python_deps() { + $dep = "pip" try { - check_system_dep "pip" - Invoke-Command python -m pip install --user pynvim -ErrorAction Break + check_system_dep "$dep" + Invoke-Command -ScriptBlock { python -m pip install --user pynvim } -ErrorAction Break } catch { print_missing_dep_msg "$dep" |