diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb9ac3a..227d551 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,6 +85,10 @@ jobs: file: package.json run: | echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > package.json + - name: /foo/package.json (bun@1.1.0) + file: /foo/package.json + run: | + echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > /foo/package.json - name: package.json (yarn@bun@1.1.0) file: package.json run: | diff --git a/src/utils.ts b/src/utils.ts index a8b69c0..7e0ca63 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,7 +1,7 @@ import { debug, warning } from "@actions/core"; import { info } from "node:console"; import { existsSync, readFileSync, renameSync } from "node:fs"; -import { join, basename } from "node:path"; +import { resolve, basename } from "node:path"; export function retry( fn: () => Promise, @@ -48,7 +48,7 @@ export function readVersionFromFile(file: string): string | undefined { debug(`Reading version from ${file}`); - const path = join(cwd, file); + const path = resolve(cwd, file); const base = basename(file); if (!existsSync(path)) {