-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Milestone
Description
Hi, is it possible to see the store-dir location before it is set in the config? Currently, this is the default output:
$ pnpm config get store-dir
undefinedbut of course there is a location for the store-dir without the config being set (~/.pnpm-store on unix, I am not sure what on windows).
This is an issue that deals with CI specifically. I want to know the store-dir in order to cache it for future builds. This is currently what it looks like for github workflows:
- uses: pnpm/action-setup@v1.2.0
with:
version: 4.14.2
- run: pnpm config set store-dir ~/.pnpm-store
- uses: actions/cache@v1
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}If I want to have windows builds as well, it gets more complicated. I will need to include a conditional to set a folder for windows. This is really unnecessary since I dont care where the folder is set, I just want to know ahead of time where it is to tell the cache. Ideally I could just do this:
- uses: pnpm/action-setup@v1.2.0
with:
version: 4.14.2
- name: Get pnpm cache directory
id: pnpm-cache
run: echo "::set-output name=dir::$(pnpm config get cache)"
- uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels