diff --git a/dist/index.js b/dist/index.js index 1a9da7d..c7aad85 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12720,7 +12720,12 @@ async function run() { var outputTitle = core.getInput("output_title") var outputSummary = core.getInput("output_summary") - var outputText = core.getInput("output_text") != "" ? core.getInput("output_text") : external_fs_.readFileSync(core.getInput("output_source_file"), 'utf8') + var outputText = "" + if (core.getInput("output_text") != "") { + outputText = core.getInput("output_text") + } else if (core.getInput("output_source_file") != "") { + outputText = external_fs_.readFileSync(core.getInput("output_source_file"), 'utf8') + } var outputAnnotations = core.getInput("output_annotations") if (outputAnnotations != "") { @@ -12748,7 +12753,7 @@ async function run() { output: { title: outputTitle, summary: outputSummary, - text: outText, + text: outputText, annotations: outputAnnotations, images: outputImages }, diff --git a/main.js b/main.js index be6eb38..db4355c 100644 --- a/main.js +++ b/main.js @@ -17,7 +17,12 @@ async function run() { var outputTitle = core.getInput("output_title") var outputSummary = core.getInput("output_summary") - var outputText = core.getInput("output_text") != "" ? core.getInput("output_text") : fs.readFileSync(core.getInput("output_source_file"), 'utf8') + var outputText = "" + if (core.getInput("output_text") != "") { + outputText = core.getInput("output_text") + } else if (core.getInput("output_source_file") != "") { + outputText = fs.readFileSync(core.getInput("output_source_file"), 'utf8') + } var outputAnnotations = core.getInput("output_annotations") if (outputAnnotations != "") { @@ -45,7 +50,7 @@ async function run() { output: { title: outputTitle, summary: outputSummary, - text: outText, + text: outputText, annotations: outputAnnotations, images: outputImages },