happytal / substitute-variables

Azure DevOps task for substituting variables in plain JSON and YAML files
MIT License
1 stars 0 forks source link

##[debug]File could not be parsed as JSON: Unexpected token a in JSON at position 0 #12

Closed tgspn closed 2 years ago

tgspn commented 2 years ago

Hello,

I've trying to transform one yaml file at my application, I've configured my task as snipped:

steps:
- task: happytal.substitutevariables.substitutevariables-task.SubstituteVariables@1
  displayName: 'Substitute variables'
  inputs:
    files: '$(System.DefaultWorkingDirectory)\_web_app\.azure\deployment-web-app.yml'

Then the task has completed successfully without errors, but the file have no changed. When I go to see the log, I see these lines:

2022-03-15T20:08:24.3444613Z ##[debug]files=C:\AzurePiplinesAgent_Extension\_work\r1\a\_web_app\.azure\deployment-web-app.yml
2022-03-15T20:08:24.3453787Z Substituting variables in C:\AzurePiplinesAgent_Extension\_work\r1\a\_web_app\.azure\deployment-web-app.yml
2022-03-15T20:08:24.3524575Z ##[debug]File could not be parsed as JSON: Unexpected token a in JSON at position 0

I don't know why, but the task are trying to parse the yaml as json. Could you help me?

tgspn commented 2 years ago

It's my mistake