Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Settings: Absolute paths with forward slashes '/' unsupported on Windows #55

Open
mfaux opened this issue Jun 4, 2021 · 3 comments
Open
Assignees

Comments

@mfaux
Copy link

mfaux commented Jun 4, 2021

Possible bug with settings (vale.valeCLI.config). The README.md says that '/' is supported for Windows paths:

vale.valeCLI.config (default: null): Absolute path to a Vale configuration file. Use the predefined ${workspaceFolder} variable to reference configuration file from a custom location. (NOTE: On Windows you can use '/' ...

Forward slashes '/' work if my path is relative. However, for absolute paths, Vale cannot find my .vale.ini file.

For example, this works:

${workspaceFolder}/vale/.vale.ini

...but this fails:

/c/git/my-repo/vale/.vale.ini

As a work-around, \ is supported. The following works:

C:\git\my-repo\vale\.vale.ini
@jganser
Copy link

jganser commented Oct 25, 2021

/c:/git/my-repo/vale/.vale.ini should work though :)

@ChrisChinchilla
Copy link
Collaborator

OK, I can take a look at this soon.

@ChrisChinchilla ChrisChinchilla self-assigned this Oct 26, 2021
@michaeltlombardi
Copy link

@mfaux the reason for this is that on Windows, / maps to your home drive (usually C:)

I just tested locally and this worked for me (CLI installed via Chocolatey per the latest instructions in Vale's docs:

{
  // using / instead of C:\
  "vale.valeCLI.path": "/ProgramData/chocolatey/bin/vale.exe"
}

FWIW I didn't need this setting to work because Vale shows up in my normal executable PATH (you can confirm on windows with gcm vale | fl). Anecdotally though it does seem slightly faster.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants