mirror of
https://gitea.com/actions/setup-node.git
synced 2026-09-24 04:30:31 +08: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:
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