mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Only warn once about workspace.rootPath
This commit is contained in:
@@ -386,9 +386,13 @@ export function createApiFactory(
|
||||
};
|
||||
|
||||
// namespace: workspace
|
||||
let warnedRootPath = false;
|
||||
const workspace: typeof vscode.workspace = {
|
||||
get rootPath() {
|
||||
extensionService.addMessage(EXTENSION_ID, Severity.Warning, 'workspace.rootPath is deprecated');
|
||||
if (!warnedRootPath) {
|
||||
warnedRootPath = true;
|
||||
extensionService.addMessage(EXTENSION_ID, Severity.Warning, 'workspace.rootPath is deprecated');
|
||||
}
|
||||
return extHostWorkspace.getPath();
|
||||
},
|
||||
set rootPath(value) {
|
||||
|
||||
Reference in New Issue
Block a user