diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-03-26 16:50:40 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-05-01 20:00:45 -0300 |
commit | c3d3d65145105c15b1cfa69c927067de48a37862 (patch) | |
tree | bdd27fddebcc334608c5a467318e50005f414c51 /src/upd8.js | |
parent | b2ed2806528adbccb1cff4380516460766549dee (diff) |
upd8, write: cleaner buildConfig step fallback logic
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-x | src/upd8.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/upd8.js b/src/upd8.js index f955e5f3..96a1e9e8 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -551,18 +551,29 @@ async function main() { logWarn`Redundant option ${cliPart}`; } } else { - if (cliFlagNegates) { - step.status = STATUS_NOT_APPLICABLE; - step.annotation = `--${cliFlag} provided`; - } + step.status = + (cliFlagNegates + ? STATUS_NOT_APPLICABLE + : STATUS_NOT_STARTED); + + step.annotation = `--${cliFlag} provided`; + if (cliFlagWarning) { for (const line of cliFlagWarning.split('\n')) { logWarn(line); } } + + return; } } + if (buildConfig?.required === true) { + step.status = STATUS_NOT_STARTED; + step.annotation = `required for --${selectedBuildModeFlag}`; + return; + } + if (buildConfig?.applicable === false) { step.status = STATUS_NOT_APPLICABLE; step.annotation = `N/A for --${selectedBuildModeFlag}`; @@ -575,6 +586,12 @@ async function main() { return; } + if (buildConfig?.default === 'perform') { + step.status = STATUS_NOT_STARTED; + step.annotation = `default for --${selectedBuildModeFlag}`; + return; + } + switch (defaultValue) { case 'skip': step.status = STATUS_NOT_APPLICABLE; |