mirror of
https://github.com/actions/setup-node.git
synced 2026-09-22 10:51:31 +00:00
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:
co-authored by
mahabaleshwars
parent
db0fb3a98e
commit
680d1e489b
Vendored
+3
-1
@@ -101351,7 +101351,9 @@ function resolveVersionInput() {
|
||||
return version;
|
||||
}
|
||||
if (versionFileInput) {
|
||||
const versionFilePath = external_path_.join(process.env.GITHUB_WORKSPACE, versionFileInput);
|
||||
// `path.resolve` (unlike `path.join`) keeps an already-absolute input as-is,
|
||||
// so a composite action can pass `${{ github.action_path }}/.nvmrc`.
|
||||
const versionFilePath = external_path_.resolve(process.env.GITHUB_WORKSPACE, versionFileInput);
|
||||
const parsedVersion = getNodeVersionFromFile(versionFilePath);
|
||||
if (parsedVersion) {
|
||||
version = parsedVersion;
|
||||
|
||||
Reference in New Issue
Block a user