Fix: bash brace-expansion corrupts JSON in update-convert-tool workflow - #2
Draft
Power-Maverick with Copilot wants to merge 2 commits into
Draft
Fix: bash brace-expansion corrupts JSON in update-convert-tool workflow#2Power-Maverick with Copilot wants to merge 2 commits into
Power-Maverick with Copilot wants to merge 2 commits into
Conversation
…convert-tool workflow
Copilot
AI
changed the title
[WIP] Fix issue with Copilot integration
Fix: bash brace-expansion corrupts JSON in update-convert-tool workflow
Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Embedding a GitHub Actions expression as a bash default value —
"${VAR:-${{ expr }}}"— causes bash to append a stray}when the expanded value is a JSON object, producing invalid JSON and failing the step with "Invalid JSON for features workflow input".Root cause
When
${{ steps.metadata.outputs.features }}expands to e.g.{"minAPI":"1.2.2","multiConnection":"optional"}, the resulting bash line is:FEATURES_SOURCE="${INPUT_FEATURES:-{"minAPI":"1.2.2","multiConnection":"optional"}}"Bash counts the
{…}inside the default as a balanced brace pair, so the}from the YAML literal that was intended to close${…}instead becomes a trailing character appended to the value — giving…optional"}}(invalid JSON).Fix
Pass the metadata outputs as
env:variables (GitHub Actions handles assignment safely) and use an explicit conditional fallback instead of the literal-JSON-as-default pattern:Applied to both the Build tool metadata JSON and Update Supabase database steps in
update-convert-tool.yml.