Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1574,9 +1574,11 @@
quoted = true;
result = result.slice(1, -1);
}
// On Windows, isAbsolute does not handle root paths without a slash, such as "C:"
const isWindowsRootPath: boolean = (process.platform === 'win32' && /^[a-zA-Z]:$/.test(result));

Check failure on line 1578 in Extension/src/LanguageServer/configurations.ts

View workflow job for this annotation

GitHub Actions / job / build

Unnecessary parentheses around expression

Check failure on line 1578 in Extension/src/LanguageServer/configurations.ts

View workflow job for this annotation

GitHub Actions / job / build

Unnecessary parentheses around expression

Check failure on line 1578 in Extension/src/LanguageServer/configurations.ts

View workflow job for this annotation

GitHub Actions / job / build

Unnecessary parentheses around expression
// Make sure all paths result to an absolute path.
// Do not add the root path to an unresolved env variable.
if (!result.includes("env:") && !path.isAbsolute(result) && this.rootUri) {
if (!isWindowsRootPath && !result.includes("env:") && !path.isAbsolute(result) && this.rootUri) {
result = path.join(this.rootUri.fsPath, result);
}
if (quoted) {
Expand Down
Loading