Skip to content

Commit

Permalink
warn instead of error when placeholder <default workspace root> pat…
Browse files Browse the repository at this point in the history
…h is not found
  • Loading branch information
DetachHead committed Dec 23, 2024
1 parent 10d8466 commit aba927d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/pyright-internal/src/analyzer/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1441,9 +1441,13 @@ export class AnalyzerService {
}

if (!foundFileSpec) {
(this._console as ConsoleInterface).error(
`File or directory "${includeSpec.wildcardRoot.toUserVisibleString()}" does not exist.`
);
const path = includeSpec.wildcardRoot.toUserVisibleString();
const message = `File or directory "${path}" does not exist.`;
if (path.includes(Uri.DefaultWorkspaceRootComponent)) {
this._console.warn(message);
} else {
this._console.error(message);
}
}
}
});
Expand Down

0 comments on commit aba927d

Please sign in to comment.