Skip to content

Commit

Permalink
npm 9 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrabinow committed Jan 8, 2023
1 parent 63b1e84 commit 7a82d1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ function install_vim_plugins()
mkdir -p "${HOME}/.local/share/coc/"
cd ~/.local/share/coc/extensions
if command -v npm > /dev/null && [ "$(whoami)" != root ]; then
npm install --global-style --ignore-scripts --no-bin-links --no-package-lock --only=prod --omit=dev
npm_major_version="$(npm --version | awk -F. '{print $1}')"
if [ "${npm_major_version}" -ge 9 ]; then
opt=--install-strategy=shallow
else
opt=--global-style
fi
npm install "${opt}" --ignore-scripts --no-bin-links --no-package-lock --omit=dev
else
vim -c "CocDisable" -c quit -c quit
fi
Expand Down

0 comments on commit 7a82d1e

Please sign in to comment.