pull/1689/head
StephenHodgson 3 days ago
parent e4df80e331
commit 5b9d385f6f

@ -44358,12 +44358,15 @@ function getInputAsInt(name, options) {
return value; return value;
} }
function getCompressionLevel(name, options) { function getCompressionLevel(name, options) {
const compressionLevel = getInputAsInt(name, options); const rawValue = core.getInput(name, options);
if (compressionLevel === undefined) { if (rawValue === "") {
return undefined; return undefined;
} }
if (compressionLevel > 9) { const compressionLevel = parseInt(rawValue, 10);
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`); if (isNaN(compressionLevel) ||
compressionLevel < 0 ||
compressionLevel > 9) {
logWarning(`Invalid compression-level provided: ${rawValue}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
return undefined; return undefined;
} }
return compressionLevel; return compressionLevel;

@ -44375,12 +44375,15 @@ function getInputAsInt(name, options) {
return value; return value;
} }
function getCompressionLevel(name, options) { function getCompressionLevel(name, options) {
const compressionLevel = getInputAsInt(name, options); const rawValue = core.getInput(name, options);
if (compressionLevel === undefined) { if (rawValue === "") {
return undefined; return undefined;
} }
if (compressionLevel > 9) { const compressionLevel = parseInt(rawValue, 10);
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`); if (isNaN(compressionLevel) ||
compressionLevel < 0 ||
compressionLevel > 9) {
logWarning(`Invalid compression-level provided: ${rawValue}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
return undefined; return undefined;
} }
return compressionLevel; return compressionLevel;

11
dist/save/index.js vendored

@ -44375,12 +44375,15 @@ function getInputAsInt(name, options) {
return value; return value;
} }
function getCompressionLevel(name, options) { function getCompressionLevel(name, options) {
const compressionLevel = getInputAsInt(name, options); const rawValue = core.getInput(name, options);
if (compressionLevel === undefined) { if (rawValue === "") {
return undefined; return undefined;
} }
if (compressionLevel > 9) { const compressionLevel = parseInt(rawValue, 10);
logWarning(`Invalid compression-level provided: ${compressionLevel}. Expected a value between 0 (no compression) and 9 (maximum compression).`); if (isNaN(compressionLevel) ||
compressionLevel < 0 ||
compressionLevel > 9) {
logWarning(`Invalid compression-level provided: ${rawValue}. Expected a value between 0 (no compression) and 9 (maximum compression).`);
return undefined; return undefined;
} }
return compressionLevel; return compressionLevel;

Loading…
Cancel
Save