Repository navigation
Fix YAML syntax errors in BIDS validation workflow template - #286
Merged
Merged
Conversation
In JS template literals, \n is interpreted as a literal newline character, not the two-character sequence \n. This broke the deployed YAML on line 33 (find -printf format) and line 51 (jq split argument) by inserting real newlines mid-line, violating YAML block scalar indentation rules. Fix: escape as \\n to produce literal \n in the output. Affected repos: nm000130, nm000131, on003825. Fixes #285
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR286Version: 🤖 Updated on each push. |
- Extract getWorkflowTemplates() for testability - Add YAML validation test (prevents #285 regression) - Fix createOrUpdateFile: handle non-OK GET responses, wrap fetch errors with context - Fix empty catch in resolveAnnexKey template - Remove hardcoded WORKFLOW_FILES; use deployWorkflows return data for accurate deployed/failed counts - Include specific errors in finalize warnings
This branch was previously deployed
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.
Summary
\n) in BIDS validation workflow template that broke YAML syntax\nbecomes a literal newline character, not the two-character sequence\n-printfformat) and line 51 (jqsplitargument)Root Cause
PR #271 added annex pointer filtering to the BIDS validation workflow template. Two shell commands use
\n:find -printf '/%P\n'- newline separator in outputjq split("\n")- split on newlineInside a JavaScript template literal (backtick string),
\nis interpreted as a real newline character. The deployed YAML ended up with literal newlines mid-line, breaking block scalar indentation rules.Fix
Escape as
\\n(double backslash) so the template produces the literal two-character sequence\nin the output YAML.Affected Repos
3 repos have the broken workflow deployed and need redeployment after this fix:
nm000130nm000131on003825Test plan
bun -ethat\\nin template literal produces literal\nstringnemar admin ci addFixes #285