mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
refactoring
This commit is contained in:
parent
0997db20d4
commit
e5034212c9
@ -77,18 +77,22 @@ function writeFeedToFile(
|
|||||||
const packageSources = json.configuration.packageSources.add;
|
const packageSources = json.configuration.packageSources.add;
|
||||||
|
|
||||||
if (Array.isArray(packageSources)) {
|
if (Array.isArray(packageSources)) {
|
||||||
packageSources.forEach((source) => {
|
packageSources.forEach(source => {
|
||||||
const value = source["@_value"];
|
const value = source['@_value'];
|
||||||
core.debug(`source '${value}'`);
|
core.debug(`source '${value}'`);
|
||||||
if (value.toLowerCase().includes(feedUrl.toLowerCase())) {
|
if (value.toLowerCase().includes(feedUrl.toLowerCase())) {
|
||||||
const key = source["@_key"];
|
const key = source['@_key'];
|
||||||
sourceKeys.push(key);
|
sourceKeys.push(key);
|
||||||
core.debug(`Found a URL with key ${key}`);
|
core.debug(`Found a URL with key ${key}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (packageSources["@_value"].toLowerCase().includes(feedUrl.toLowerCase())) {
|
if (
|
||||||
const key = packageSources["@_key"];
|
packageSources['@_value']
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(feedUrl.toLowerCase())
|
||||||
|
) {
|
||||||
|
const key = packageSources['@_key'];
|
||||||
sourceKeys.push(key);
|
sourceKeys.push(key);
|
||||||
core.debug(`Found a URL with key ${key}`);
|
core.debug(`Found a URL with key ${key}`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user