Skip to content

Commit c26bf1a

Browse files
autofix-ci[bot]Jason3S
authored andcommitted
[autofix.ci] apply automated fixes
1 parent fbdf154 commit c26bf1a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

action/lib/main_root.cjs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17684,8 +17684,12 @@ function toCommandProperties(annotationProperties) {
1768417684

1768517685
// src/actions/core/command.ts
1768617686
function issueCommand(command, properties, message) {
17687+
const cmd = formatCommand(command, properties, message);
17688+
process.stdout.write(cmd + os.EOL);
17689+
}
17690+
function formatCommand(command, properties, message) {
1768717691
const cmd = new Command(command, properties, message);
17688-
process.stdout.write(cmd.toString() + os.EOL);
17692+
return cmd.toString();
1768917693
}
1769017694
var CMD_STRING = "::";
1769117695
var Command = class {
@@ -17754,22 +17758,16 @@ function issueFileCommand(command, message) {
1775417758
function prepareKeyValueMessage(key, value) {
1775517759
const delimiter = `ghadelimiter_${import_node_crypto.default.randomUUID()}`;
1775617760
const convertedValue = toCommandValue(value);
17757-
if (key.includes(delimiter)) {
17758-
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
17759-
}
17760-
if (convertedValue.includes(delimiter)) {
17761-
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
17762-
}
1776317761
return `${key}<<${delimiter}${import_node_os.default.EOL}${convertedValue}${import_node_os.default.EOL}${delimiter}`;
1776417762
}
1776517763

1776617764
// src/actions/core/core.ts
1776717765
function getInput(name2, options) {
1776817766
const val = process.env[`INPUT_${name2.replace(/ /g, "_").toUpperCase()}`] || "";
17769-
if (options && options.required && !val) {
17767+
if (options?.required && !val) {
1777017768
throw new Error(`Input required and not supplied: ${name2}`);
1777117769
}
17772-
if (options && options.trimWhitespace === false) {
17770+
if (options?.trimWhitespace === false) {
1777317771
return val;
1777417772
}
1777517773
return val.trim();

0 commit comments

Comments
 (0)