From 450a5d0bc896d0014b6d1ac7e061888318369024 Mon Sep 17 00:00:00 2001 From: Maksym H Date: Tue, 21 Jan 2025 16:53:34 +0000 Subject: [PATCH] Update cmd.yml --- .github/workflows/cmd.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmd.yml b/.github/workflows/cmd.yml index 1504dee40333..72c5e4e87bae 100644 --- a/.github/workflows/cmd.yml +++ b/.github/workflows/cmd.yml @@ -437,6 +437,9 @@ jobs: after-cmd: needs: [cmd, get-pr-info, before-cmd] + env: + CMD: ${{ needs.get-pr-info.outputs.CMD }} + PR_BRANCH: ${{ needs.get-pr-info.outputs.pr-branch }} runs-on: ubuntu-latest steps: - name: Checkout @@ -548,11 +551,9 @@ jobs: let jobUrl = ${{ needs.before-cmd.outputs.job_url }} let cmdOutput = process.env.CMD_OUTPUT; let cmd = process.env.CMD; - - if (cmdOutput) { - let cmdOutputCollapsed = cmdOutput.trim() !== '' - ? `
\n\nCommand output:\n\n${cmdOutput}\n\n
` - : ''; + let cmdOutputCollapsed = ''; + if (cmdOutput && cmdOutput.trim() !== '') { + cmdOutputCollapsed = `
\n\nCommand output:\n\n${cmdOutput}\n\n
` } github.rest.issues.createComment({