mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
ensure that the scheme is 'file' detecting scripts
This commit is contained in:
parent
c6686be263
commit
8844915863
|
@ -104,9 +104,13 @@ function isEnabled(folder: vscode.WorkspaceFolder): boolean {
|
|||
}
|
||||
|
||||
async function provideNpmScriptsForFolder(folder: vscode.WorkspaceFolder): Promise<vscode.Task[]> {
|
||||
let rootPath = folder.uri.fsPath;
|
||||
let emptyTasks: vscode.Task[] = [];
|
||||
|
||||
if (folder.uri.scheme !== 'file') {
|
||||
return emptyTasks;
|
||||
}
|
||||
let rootPath = folder.uri.fsPath;
|
||||
|
||||
let packageJson = path.join(rootPath, 'package.json');
|
||||
if (!await exists(packageJson)) {
|
||||
return emptyTasks;
|
||||
|
|
Loading…
Reference in a new issue