-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Before opening an issue please read this.
Are you reporting a bug or a feature request ?
- Bug
- Feature request
Description
When JSON content of input file has comments the task fails with ambiguous message:
##[error]Couldn't apply patch to file: C:\myTargetDir\_configs\appsettings.dev.json
##[error]No files were patched.
Expected behavior
- Good: output an error that would clearly point to a problem: "malformed JSON content" or "unsupported JSON content at line XXX", etc.
- Better: ignore comments in JSON
Reproduction
Add this task (ver. 3/4) to a pipeline that works with filesystem (Azure Pipeline Windows 2019 agent pool) with options:
- Syntax type: Slick Syntax,
- Target files: appsettings.$(env).json
- Patch content:
- Output patched file in logs: checked
- Fail if no files are patched: checked
and taking into account that file actually exist
the task logs ambiguous error:
##[error]Couldn't apply patch to file: C:\myTargetDir\_configs\appsettings.dev.json
##[error]No files were patched."
# System information
**VSTS or TFS:**
* [x] VSTS
* [ ] TFS
**Agent:**
* [x] Hosted
* [ ] Custom
**OS:**
* [x] Windows
* [ ] Mac
* [ ] Linux
Metadata
Metadata
Assignees
Labels
No labels