Warn if the action ends up not installing any .NET version.
This commit is contained in:
parent
607fce577a
commit
9984a6fa87
|
@ -526,6 +526,9 @@ function run() {
|
||||||
if (fs.existsSync(globalJsonPath)) {
|
if (fs.existsSync(globalJsonPath)) {
|
||||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
core.info(`global.json wasn't found in the root directory. No .NET version will be installed.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (versions.length) {
|
if (versions.length) {
|
||||||
const quality = core.getInput('dotnet-quality');
|
const quality = core.getInput('dotnet-quality');
|
||||||
|
|
|
@ -46,6 +46,10 @@ export async function run() {
|
||||||
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
||||||
if (fs.existsSync(globalJsonPath)) {
|
if (fs.existsSync(globalJsonPath)) {
|
||||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||||
|
} else {
|
||||||
|
core.info(
|
||||||
|
`global.json wasn't found in the root directory. No .NET version will be installed.`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue