aws-cloudformation / aws-cloudformation/cfn-lint-visual-studio-code
cfnLint.path doesn't resolve ${workspaceFolder}
- Dominant language
- JavaScript
- Stars
- 289
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I was having a hard time getting this extension to work until I found https://github.com/awslabs/aws-cfn-lint-visual-studio-code/issues/21.
```
> Determined this file is a CloudFormation Template. file:///Users/user/test/test.yml. Found the string AWSTemplateFormatVersion
> running............. ${workspaceFolder}/venv/bin/cfn-lint --format,json,--template,/Users/user/test/test.yml
> Unable to start cfn-lint (Error: spawn ${workspaceFolder}/venv/bin/cfn-lint ENOENT). Is cfn-lint installed correctly?
```
After doing a `which cfn-lint`, grabbing the results, and making that the value of `cfnLint.Path, things started working.
```
Determined this file is a CloudFormation Template. file:///Users/user/test/test.yml. Found the string AWSTemplateFormatVersion
running............. /Users/user/test/venv/bin/cfn-lint --format,json,--template,/Users/user/test/test.yml
```
Looks like `${workspaceFolder}` isn't being resolved. Is this the expected behavior?
Contributor guide
Research direction
Reproduce the failure with cfnLint.path set to ${workspaceFolder}/venv/bin/cfn-lint, then trace how that setting reaches the process spawn. Done means the workspaceFolder variable resolves to the workspace path before cfn-lint runs, while the existing absolute-path configuration continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100