az blueprint artifact create returns JSON parsing error instead of File Not Found
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
When providing an invalid path to JSON file that will be used to create a policy or a template for a Blueprint, the CLI returns a JSON parsing error instead of a File Not Found error.
**To Reproduce**
Create a Blueprint object
```
az blueprint create \
--name 'MyBlueprint' \
--description 'This blueprint sets tag policy and role assignment on the subscription, creates a ResourceGroup, and deploys a resource template and role assignment to that ResourceGroup.' \
--parameters blueprintparms.json
```
Add a policy
```
az blueprint artifact policy create \
--blueprint-name 'MyBlueprint' \
--artifact-name 'policyTags' \
--policy-definition-id '/providers/Microsoft.Authorization/policyDefinitions/49c88fc8-6fd1-46fd-a676-f12d1d3a4c71' \
--display-name 'Apply tag and its default value to resource groups' \
--description 'Apply tag and its default value to resource groups' \
--parameters artifacts\policyTags.json
```
Error:
`Expecting value: line 1 column 1 (char 0)
`
**Expected behavior**
Since I am on a mac, the `\ `character is not a valid path separator. It should have been a` / `and I would expect that the CLI would tell me File Not Found.
**Environment summary**
This was a on a mac in bash.
**Additional context**
I saw the same behavior for` az blueprint template create` as well
Contributor guide
Assessment
This issue has not been assessed yet.