Only warn once about workspace.rootPath

This commit is contained in:
Alex Dima
2017-11-30 10:08:14 +01:00
parent ba324c4f9b
commit e05a406722

View File

@@ -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) {