Open craighurley opened 4 years ago
This issue would also help in my case: https://github.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/issues/60
The reason I ask is that I am trying to use
cfn-lint
in a docker container to avoid pip dependency conflicts I'm having
Sorry about the delayed response. Not sure if this fits your use-case, but figured I'd mention the online demo pre-configures the environment with dependencies and could be a potential alternative without installation problems
Plugin Version: 0.10.20 VS Code version: 1.43.2 OS: Darwin x64 19.4.0
Is it possible to make the cfn-lint plugin use relative paths from the project root rather than absolute paths?
The reason I ask is that I am trying to use
cfn-lint
in a docker container to avoid pip dependency conflicts I'm having. Outside of VS Code, runningcfn-lint
in the container against templates works successfully.In order to make VS Code use the container I do the following:
$HOME/bin/cfn-lint
$HOME/bin/cfn-lint
.The script at
$HOME/bin/cfn-lint
which I use to pass arguments from VS Code to the container is as follows:Now I do the following:
A. Open a project with a project root of
/Users/hurley/Projects/example/
. B. Open a CFN template at./templates/ec2.yaml
C. VS Code correctly calls the script and passes the template, but because it uses absolute paths it fails with the following:The reason for the error is because the container has a volume mapped from
/Users/hurley/Projects/example/
on my local machine to/workdir
in the container, socfn-lint
inside the container is not aware of/Users/hurley/Projects/example/
.