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

v6 not injecting tokens where pattern is enclosed in double quotes #23

Open
rebeccajenkinsquest opened this issue Mar 20, 2024 · 1 comment

Comments

@rebeccajenkinsquest
Copy link

Issue encountered after upgrading pipelines to use v6. Here is an example of the inputs we updated to, which were tested successfully against variables indicated simply with -- but not when surrounded by double quotes--e.g., "--VARIABLE--".

                tokenPattern: custom
                tokenPrefix: '--'
                tokenSuffix: '--'

Is this behavior unexpected, or is there a recommendation for how this can be configured differently from our side?

@qetza
Copy link
Owner

qetza commented Mar 21, 2024

Hi @rebeccajenkinsquest,
I've tried to reproduce your issue but didn't have any error.

My test pipeline:

trigger: none

pool:
  vmImage: ubuntu-latest

variables:
  VARIABLE: value

steps:
  - task: replacetokens@6
    inputs:
      root: 'issue-23'
      sources: '*.json'
      tokenPattern: 'custom'
      tokenPrefix: '--'
      tokenSuffix: '--'
      logLevel: 'debug'

My test file issue-23/data.json

{
  "var": "--VARIABLE--"
}

output
image

Could you share with me some more details? Your redacted debug logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants