formulahendry / formulahendry/vscode-code-runner
wrong macro expansion for $dir in windows ! (includes backward slash)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.4k
- Forks
- 351
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Environment data
VS Code version: 1.19.1
Python Extension version: 3.5.2
Python Version: 3.5
OS and version: Windows 8.1
## Actual behavior
in settings.json , when we use `$dir ` in any settings , it takes backward slash as separator and becoz of that "path1\path2\path3\" , since it includes a backward slash at end of path , that end quotes " gets ignored and it throws me a file not found error .
## Expected behavior
`$dir` should resolve to `"path1\\path2\\path3\\"` or `"path1/path2/path3/"` (with forward slashes)
## Steps to reproduce:
Put this in settings.json
```
"code-runner.executorMap": {
"cpp": "cd $dir "
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Reproduce the issue on Windows using settings.json and the code-runner.executorMap entry shown in the report. Trace how `$dir` is expanded before the command is executed, especially when the resolved path ends with a backslash. Done means the generated command remains valid and uses escaped backslashes or forward slashes without causing a file-not-found error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vscode
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100