Skip to content

fails when ${nextRelease.notes} contains quotes #459

@scrocquesel

Description

@scrocquesel

I'm trying to pass ${nextRelease.notes} to an exec step but it fails if the notes contains quotes with Unterminated quoted string.

For exemple, I have a commit with message

feat(test): test"'

with s "' pecial characters

The espaceCommand seems to have single quote escaped but not quotes.

escapedCommand: `'./templates/azdo/summary.sh "## [1.1.0](https://dev.azure.com/_git/containerapps-sample/branchCompare?baseVersion=GTrelease/1.0.1&targetVersion=GTrelease/1.1.0&_a=commits) (2025-06-07)\\n\\n\\n### Features\\n\\n*  test ([e21ff0f]([https://dev.azure.com/_git/containerapps-sample/commit/e21ff0f4bc00a00d2e87d10cdbb966db176c2ed8))\\n*](https://dev.azure.com/_git/containerapps-sample/commit/e21ff0f4bc00a00d2e87d10cdbb966db176c2ed8))//n*) **test:**  test"'\\'' ([1e411df]([https://dev.azure.com/_git/containerapps-sample/commit/1e411df9eb41669aab917f2c9b2b9ea48b9e61f0))\\n\\n"\\n'`,](https://dev.azure.com/_git/containerapps-sample/commit/1e411df9eb41669aab917f2c9b2b9ea48b9e61f0))//n//n%22//n'%60,)

The plugin is configured with this yaml fragment

  - - '@semantic-release/exec'
    - publishCmd: |
        ./summary.sh "${nextRelease.notes}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions