Unverified Commit 6e442911 authored by Oscar Busk's avatar Oscar Busk Committed by GitHub

Stop writing window specific paths in vscode configuration (#42338)

Vscode `tsdk` configuration handles POSIX path even on Windows, so
there's no reason to write window-specific path to the configuration.

I've always had forward slash path in `tsdk` and work on windows and in
WSL, and that works.


https://github.com/oBusk/npm-diff.app/blob/f71e4671430373c2af6a88c3c13f7c437334ab8d/.vscode/settings.json#L3

Current solution will give a diff for people who have ran previous
versions on windows. We could update the check to allow windows if you
want to.
parent 8350f7ef
...@@ -24,8 +24,7 @@ export async function writeVscodeConfigurations( ...@@ -24,8 +24,7 @@ export async function writeVscodeConfigurations(
} }
} }
const libPath = const libPath = './node_modules/typescript/lib'
'.' + path.sep + path.join('node_modules', 'typescript', 'lib')
if ( if (
settings['typescript.tsdk'] === libPath && settings['typescript.tsdk'] === libPath &&
settings['typescript.enablePromptUseWorkspaceTsdk'] settings['typescript.enablePromptUseWorkspaceTsdk']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment