aws / aws/aws-toolkit-vscode

AWS CloudFormation LSP cfn-lint worker crashes on path with spaces (percent-encoded URI)

Open
#8,829 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

### Summary
The AWS Toolkit CloudFormation language server cfn-lint worker exits with code 1 when linting a template in a workspace path that contains spaces.

The CLI cfn-lint works on the same file path.

### Environment
- VS Code: 3.12.17 (commit 0fb762053c34788bb7760d5673f8a6d4c8589d50, arm64)
- AWS Toolkit extension: 4.10.0
- cfn-lint extension (also installed): 0.27.0
- cfn-lint CLI: 1.53.0
- macOS: 26.5.2 (25F84)

### Repro
1. Open a CloudFormation template in a folder path containing spaces, e.g.:
/Users/.../GCP Terraform Course/Gemini TF AWS EKS Code/CloudFormation Example.yaml
2. Ensure AWS CloudFormation diagnostics cfn-lint is enabled.
3. Open the template and wait for diagnostics.

### Actual
- Diagnostic shows: `CFN Lint Error: Worker exited unexpectedly with code 1`
- AWS CloudFormation language server log shows:
- URI includes percent-encoding (`CloudFormation%20Example.yaml`)
- then pyodide cfn-lint raises:

```text
ValueError: /Gemini TF AWS EKS Code/CloudFormation%20Example.yaml could not be processed by glob.glob
...
[PyodideWorkerManager] Worker exited unexpectedly with code 1
```

### Expected
No worker crash. Path with spaces should lint normally (same as CLI behavior).

### Additional notes
- Running `cfn-lint` directly from terminal on the same template exits 0.
- Current workaround is to set explicit external cfn-lint path and/or disable AWS Toolkit cfn-lint diagnostics.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the AWS CloudFormation language server failure with a template under a path containing spaces, then trace the logged URI through PyodideWorkerManager and the cfn-lint worker. Done means the worker no longer exits with code 1 and diagnostics succeed for the percent-encoded path, matching the CLI behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.