Unverified Commit 22d71e33 authored by Dylan Musil's avatar Dylan Musil Committed by GitHub
Browse files

Update Node Windows example to find the npm cache (#223)

parent b13df3fa
Loading
Loading
Loading
Loading
+6 −2
Changes for examples.md: 6 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -140,10 +140,14 @@ For npm, cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` o
### Windows

```yaml
- name: Get npm cache directory
  id: npm-cache
  run: |
    echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
  with:
    path: ~\AppData\Roaming\npm-cache
    key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }}
    path: ${{ steps.npm-cache.outputs.dir }}
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
    restore-keys: |
      ${{ runner.os }}-node-
```