accept absolute paths for 'global-json-file' input

This commit is contained in:
Othmane Kinane 2023-03-11 00:40:58 +01:00
parent 0001c12c91
commit 2e8f2a4763
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -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`);
}

View File

@ -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`