From 2e8f2a4763c15f2c8f07380c900176fa8e40c0eb Mon Sep 17 00:00:00 2001 From: Othmane Kinane <76955412+othmane-kinane-nw@users.noreply.github.com> Date: Sat, 11 Mar 2023 00:40:58 +0100 Subject: [PATCH] accept absolute paths for 'global-json-file' input --- dist/index.js | 2 +- src/setup-dotnet.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index bbe2c2b..8e20d7f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -513,7 +513,7 @@ function run() { const installedDotnetVersions = []; const globalJsonFileInput = core.getInput('global-json-file'); if (globalJsonFileInput) { - const globalJsonPath = path_1.default.join(process.cwd(), globalJsonFileInput); + const globalJsonPath = path_1.default.resolve(process.cwd(), globalJsonFileInput); if (!fs.existsSync(globalJsonPath)) { throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`); } diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 119053a..31c80a2 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -31,7 +31,7 @@ export async function run() { const globalJsonFileInput = core.getInput('global-json-file'); if (globalJsonFileInput) { - const globalJsonPath = path.join(process.cwd(), globalJsonFileInput); + const globalJsonPath = path.resolve(process.cwd(), globalJsonFileInput); if (!fs.existsSync(globalJsonPath)) { throw new Error( `The specified global.json file '${globalJsonFileInput}' does not exist`