mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-19 23:25:07 +00:00
accept absolute paths for 'global-json-file' input
This commit is contained in:
parent
0001c12c91
commit
2e8f2a4763
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -513,7 +513,7 @@ function run() {
|
|||||||
const installedDotnetVersions = [];
|
const installedDotnetVersions = [];
|
||||||
const globalJsonFileInput = core.getInput('global-json-file');
|
const globalJsonFileInput = core.getInput('global-json-file');
|
||||||
if (globalJsonFileInput) {
|
if (globalJsonFileInput) {
|
||||||
const globalJsonPath = path_1.default.join(process.cwd(), globalJsonFileInput);
|
const globalJsonPath = path_1.default.resolve(process.cwd(), globalJsonFileInput);
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
if (!fs.existsSync(globalJsonPath)) {
|
||||||
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
|
throw new Error(`The specified global.json file '${globalJsonFileInput}' does not exist`);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ export async function run() {
|
|||||||
|
|
||||||
const globalJsonFileInput = core.getInput('global-json-file');
|
const globalJsonFileInput = core.getInput('global-json-file');
|
||||||
if (globalJsonFileInput) {
|
if (globalJsonFileInput) {
|
||||||
const globalJsonPath = path.join(process.cwd(), globalJsonFileInput);
|
const globalJsonPath = path.resolve(process.cwd(), globalJsonFileInput);
|
||||||
if (!fs.existsSync(globalJsonPath)) {
|
if (!fs.existsSync(globalJsonPath)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The specified global.json file '${globalJsonFileInput}' does not exist`
|
`The specified global.json file '${globalJsonFileInput}' does not exist`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user