Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${workspaceFolder} contains a leading slash on windows systems. It must not. #225498

Closed
SeidChr opened this issue Aug 13, 2024 · 5 comments
Closed
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension variable-resolving

Comments

@SeidChr
Copy link

SeidChr commented Aug 13, 2024

Does this issue occur when all extensions are disabled?: Yes/No

VSCODE-About:
Version: 1.92.0 (user setup)
Commit: b1c0a14
Date: 2024-07-31T23:26:45.634Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Steps to Reproduce:

  1. use a windows system with vscode
  2. use ${workspaceFolder} in a .vscode\settings.json value
  3. print the calculated value (I am using asciidocjs and print the attribute into a .adoc document, then look at the preview)

the value will be something like "/c:/abc"
it should be "c:\abc"

The direction of the slash actually doesn't matter so much, but the leading slash breaks certain tools, which are unfortunately unable to execute logic which could remove the slash.

The settings.json (inside of a project-local .vscode folder):

{
  "asciidoc.extensions.enableKroki": true,
  "asciidoc.preview.asciidoctorAttributes": {
      "kroki-server-url": "https://kroki.###############",
      "documentroot": "${workspaceFolder}/asciidoc/root/src",
      "imagesdir": "${workspaceFolder}/asciidoc/root/src/images",
  },
}
@alexr00
Copy link
Member

alexr00 commented Aug 13, 2024

Which setting are you setting are you using?

@alexr00 alexr00 added info-needed Issue requires more information from poster variable-resolving labels Aug 13, 2024
@vs-code-engineering vs-code-engineering bot removed the info-needed Issue requires more information from poster label Aug 14, 2024
@SeidChr
Copy link
Author

SeidChr commented Aug 14, 2024

Which setting are you setting are you using?

i added it to the original post :)

@alexr00
Copy link
Member

alexr00 commented Aug 14, 2024

Thanks! VS Code doesn't do variable resolving for all settings. Since that's an extension provided setting, it's the extension that provides the setting that's including that slash.

@alexr00 alexr00 added the *caused-by-extension Issue identified to be caused by an extension label Aug 14, 2024
Copy link

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2024
@SeidChr
Copy link
Author

SeidChr commented Aug 15, 2024

Created a ticket here:
asciidoctor/asciidoctor-vscode#897

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension variable-resolving
Projects
None yet
Development

No branches or pull requests

3 participants