Skip to content

Commit

Permalink
Ensure npm link uses --save
Browse files Browse the repository at this point in the history
To prevent npm install from overriding `npm link` outcomes or getting
errors when running `npm ls` we must be sure we do always add `--save`

Related: npm/cli#2380
Related: ansible/ansible-language-server#130
  • Loading branch information
ssbarnea committed Nov 18, 2021
1 parent b93210e commit e7baade
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
set -ex
mv ansible-language-server ..
npm link ../ansible-language-server
npm link --save ../ansible-language-server
pushd ../ansible-language-server
npm ci
npm run compile
Expand Down Expand Up @@ -124,6 +124,8 @@ jobs:

# extra safety measure that ensures code was not modified during build
- name: Ensure git does not report dirty
# on devel we use `npm link --save ..` which will alter tracked files
if: ${{ !matrix.devel }}
run: git diff --exit-code

check: # This job does nothing and is only used for the branch protection
Expand Down

0 comments on commit e7baade

Please sign in to comment.