mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 17:30:34 +01:00
fixup
This commit is contained in:
parent
2e9d44ddf6
commit
66d0f1790f
3 changed files with 7 additions and 6 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -95322,8 +95322,8 @@ const getMacOsInfo = async () => {
|
||||||
};
|
};
|
||||||
function getPropertyViaWithDefault(data, names, defaultValue) {
|
function getPropertyViaWithDefault(data, names, defaultValue) {
|
||||||
for (const name of names) {
|
for (const name of names) {
|
||||||
const ret = getPropertyWithDefault(data, name, undefined);
|
const ret = getPropertyWithDefault(data, name, defaultValue);
|
||||||
if (ret !== undefined) {
|
if (ret !== defaultValue) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
dist/platform.js
generated
vendored
4
dist/platform.js
generated
vendored
|
@ -29,8 +29,8 @@ const getMacOsInfo = async () => {
|
||||||
};
|
};
|
||||||
function getPropertyViaWithDefault(data, names, defaultValue) {
|
function getPropertyViaWithDefault(data, names, defaultValue) {
|
||||||
for (const name of names) {
|
for (const name of names) {
|
||||||
const ret = getPropertyWithDefault(data, name, undefined);
|
const ret = getPropertyWithDefault(data, name, defaultValue);
|
||||||
if (ret !== undefined) {
|
if (ret !== defaultValue) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,9 @@ function getPropertyViaWithDefault<T, Property extends string>(
|
||||||
defaultValue: T,
|
defaultValue: T,
|
||||||
): T {
|
): T {
|
||||||
for (const name of names) {
|
for (const name of names) {
|
||||||
const ret: T | undefined = getPropertyWithDefault(data, name, undefined);
|
const ret: T = getPropertyWithDefault(data, name, defaultValue);
|
||||||
if (ret !== undefined) {
|
|
||||||
|
if (ret !== defaultValue) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue