mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-12 22:08:04 -05:00
Move exist check to the right place
This commit is contained in:
@@ -84,6 +84,17 @@ async function getBuiltInExtensionInfos() {
|
||||
allExtensions.push(ext);
|
||||
locations[ext.extensionPath] = path.join(BUILTIN_MARKETPLACE_EXTENSIONS_ROOT, ext.extensionPath);
|
||||
}
|
||||
for (const ext of allExtensions) {
|
||||
if (ext.packageJSON.browser) {
|
||||
let mainFilePath = path.join(locations[ext.extensionPath], ext.packageJSON.browser);
|
||||
if (path.extname(mainFilePath) !== '.js') {
|
||||
mainFilePath += '.js';
|
||||
}
|
||||
if (!await exists(mainFilePath)) {
|
||||
fancyLog(`${ansiColors.red('Error')}: Could not find ${mainFilePath}. Use ${ansiColors.cyan('yarn watch-web')} to build the built-in extensions.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return { extensions: allExtensions, locations };
|
||||
}
|
||||
|
||||
@@ -124,16 +135,6 @@ async function getExtensionPackageJSON(extensionPath) {
|
||||
return; // unsupported
|
||||
}
|
||||
|
||||
if (packageJSON.browser) {
|
||||
let mainFilePath = path.join(extensionPath, packageJSON.browser);
|
||||
if (path.extname(mainFilePath) !== '.js') {
|
||||
mainFilePath += '.js';
|
||||
}
|
||||
if (!await exists(mainFilePath)) {
|
||||
fancyLog(`${ansiColors.yellow('Warning')}: Could not find ${mainFilePath}. Use ${ansiColors.cyan('yarn gulp watch-web')} to build the built-in extensions.`);
|
||||
}
|
||||
}
|
||||
|
||||
const packageNLSPath = path.join(extensionPath, 'package.nls.json');
|
||||
const packageNLSExists = await exists(packageNLSPath);
|
||||
if (packageNLSExists) {
|
||||
|
||||
Reference in New Issue
Block a user