From 1df98ef0c80d47c29bfeb1e8d66e3d1636dbd5ad Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 4 Dec 2023 11:02:15 -0700 Subject: [PATCH] fix: run install-latest-npm in temp dir This fixes an issue where npx semver fails in an unreified tree that is expected to contain the semver bin. --- .github/actions/install-latest-npm/action.yml | 1 + lib/content/action-install-latest-npm-yml.hbs | 1 + tap-snapshots/test/apply/source-snapshots.js.test.cjs | 3 +++ 3 files changed, 5 insertions(+) diff --git a/.github/actions/install-latest-npm/action.yml b/.github/actions/install-latest-npm/action.yml index f2e86c84..8339dbf0 100644 --- a/.github/actions/install-latest-npm/action.yml +++ b/.github/actions/install-latest-npm/action.yml @@ -29,6 +29,7 @@ runs: shell: bash env: NODE_VERSION: ${{ inputs.node }} + working-directory: ${{ runner.temp }} run: | MATCH="" SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6") diff --git a/lib/content/action-install-latest-npm-yml.hbs b/lib/content/action-install-latest-npm-yml.hbs index 75c7ac78..ee423487 100644 --- a/lib/content/action-install-latest-npm-yml.hbs +++ b/lib/content/action-install-latest-npm-yml.hbs @@ -27,6 +27,7 @@ runs: shell: bash env: NODE_VERSION: $\{{ inputs.node }} + working-directory: $\{{ runner.temp }} run: | MATCH="" SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6") diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 4f394ab9..a87f1935 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -130,6 +130,7 @@ runs: shell: bash env: NODE_VERSION: \${{ inputs.node }} + working-directory: \${{ runner.temp }} run: | MATCH="" SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6") @@ -1557,6 +1558,7 @@ runs: shell: bash env: NODE_VERSION: \${{ inputs.node }} + working-directory: \${{ runner.temp }} run: | MATCH="" SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6") @@ -3321,6 +3323,7 @@ runs: shell: bash env: NODE_VERSION: \${{ inputs.node }} + working-directory: \${{ runner.temp }} run: | MATCH="" SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6")