Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ runs:
- name: Normalize cache key
id: cache-key
shell: bash
env:
ADDITIONAL_CACHE_KEY: ${{ inputs.additional-cache-key }}
run: |
key="${{ inputs.additional-cache-key }}"
key="${ADDITIONAL_CACHE_KEY}"
key="${key// /-}"
key="${key//\//-}"
key="${key//$'\n'/}"
key="${key//$'\r'/}"
echo "key=${key}" >> "$GITHUB_OUTPUT"
- name: Setup rust cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Specify Target
id: target-spec
env:
INPUT_TARGET: ${{ inputs.target }}
run: |
export TARGET="${{ inputs.target }}"
export TARGET="${INPUT_TARGET}"
if [[ -z $TARGET ]]; then
export TARGET="${GIT_REF_NAME%/*}"
fi
echo "Target: $TARGET"
echo "Target: "${INPUT_TARGET}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclosed quote causes bash syntax error in workflow

High Severity

The line echo "Target: "${INPUT_TARGET}" has malformed quoting - the string "Target: " is closed, then ${INPUT_TARGET} is unquoted, and a trailing " opens a new quote that's never closed. This causes a bash syntax error that will fail the workflow. Additionally, the original code printed $TARGET (the potentially-modified value) but this prints ${INPUT_TARGET} (the raw input), which changes the debugging output behavior.

Fix in Cursor Fix in Web

echo "target=$TARGET" >> $GITHUB_OUTPUT
- name: Create matrix
id: platforms
Expand Down
Loading