Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix parameters for Gradle command in publish workflow #119

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

guilgaly
Copy link
Member

Motivation:

In YAML, folded-style block scalars (with '>') do not insert new lines... Except when the indentation changes. So we had unexpected new lines separating the parameters from the command.

Modifications:

Use a literal-style block scalar (with '|') and add backslashes to continue the command. At least it's explicit and there is no surprising behavior.

Result:

Parameters are properly passed to the Gradle command when executing the publish workflow.

Motivation:

In YAML, folded-style block scalars (with '>') do not insert new lines... Except when the indentation changes. So we had unexpected new lines separating the parameters from the command.

Modifications:

Use a literal-style block scalar (with '|') and add backslashes to continue the command. At least it's explicit and there is no surprising behavior.

Result:

Parameters are properly passed to the Gradle command when executing the publish workflow.
@guilgaly guilgaly self-assigned this Feb 12, 2025
@guilgaly
Copy link
Member Author

If you're curious, for an example of this behavior, try the following YAML in a parser such as https://yaml-online-parser.appspot.com

root:
  noLineBreak: >
    foo
    bar
  somewhatSurprisingLineBreak: >
    foo
      bar
  preserveLineBreaks: |
    foo
    bar

Copy link
Member

@Isammoc Isammoc left a comment

Choose a reason for hiding this comment

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

Oh my! And I knew it 🤦

@slandelle slandelle merged commit 1cebb6d into main Feb 13, 2025
1 check passed
@slandelle slandelle deleted the fix-publish-workflow branch February 13, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants