mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Remove use of deprecated rootPath
Fixes https://github.com/microsoft/vscode-extension-samples/issues/357
This commit is contained in:
@ -10,7 +10,8 @@ let rakeTaskProvider: vscode.Disposable | undefined;
|
||||
let customTaskProvider: vscode.Disposable | undefined;
|
||||
|
||||
export function activate(_context: vscode.ExtensionContext): void {
|
||||
const workspaceRoot = vscode.workspace.rootPath;
|
||||
const workspaceRoot = (vscode.workspace.workspaceFolders && (vscode.workspace.workspaceFolders.length > 0))
|
||||
? vscode.workspace.workspaceFolders[0].uri.fsPath : undefined;
|
||||
if (!workspaceRoot) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user