Support absolute paths in node-version-file (#1633)

* path.resolve for composite actions

* log and documentation update

---------

Co-authored-by: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com>
This commit is contained in:
v-mahabaleshwars
2026-09-22 01:55:01 +05:30
committed by GitHub
parent db0fb3a98e
commit 680d1e489b
4 changed files with 39 additions and 3 deletions
+3 -1
View File
@@ -120,7 +120,9 @@ function resolveVersionInput(): string {
}
if (versionFileInput) {
const versionFilePath = path.join(
// `path.resolve` (unlike `path.join`) keeps an already-absolute input as-is,
// so a composite action can pass `${{ github.action_path }}/.nvmrc`.
const versionFilePath = path.resolve(
process.env.GITHUB_WORKSPACE!,
versionFileInput
);