From 76e658529b3100d8ddaafc5718fae71df2198cae Mon Sep 17 00:00:00 2001 From: Aki Kanellis Date: Wed, 4 Jan 2023 21:54:07 +0000 Subject: [PATCH] refactor: replace `--location=global` with `--global` npm first [deprecated](https://github.com/npm/cli/pull/4879) but has since [undeprecated](https://github.com/npm/cli/pull/4982) it. --- ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2 | 2 +- ansible/roles/common/tasks/npm.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2 b/ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2 index c08345696..22c1442c2 100644 --- a/ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2 +++ b/ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2 @@ -46,7 +46,7 @@ function update() { if command_exists npm; then echo "Updating npm..." - npm update --location=global + npm update --global echo "npm updated!" fi diff --git a/ansible/roles/common/tasks/npm.yml b/ansible/roles/common/tasks/npm.yml index 2ccb8942b..486a91548 100644 --- a/ansible/roles/common/tasks/npm.yml +++ b/ansible/roles/common/tasks/npm.yml @@ -8,6 +8,6 @@ ansible.builtin.command: cmd: > zsh -c "source ~/.asdf/asdf.sh && - direnv exec ~ npm install --location=global {{ item }}" + direnv exec ~ npm install --global {{ item }}" creates: "{{ npm_binaries_dir }}/{{ item }}" loop: "{{ package_names }}"