Improve UX when we can't install a package (#1000)

This commit is contained in:
Fábio Rosado
2022-12-05 14:35:15 +00:00
committed by GitHub
parent 5aa9135a34
commit af60299324
5 changed files with 102 additions and 6 deletions

View File

@@ -227,8 +227,10 @@ be removed from the Python global namespace in the following release. \
To avoid errors in future releases use import from pyscript instead. For instance: \
from pyscript import micropip, Element, console, document`);
logger.info('Packages to install: ', this.config.packages);
await runtime.installPackage(this.config.packages);
if (this.config.packages) {
logger.info('Packages to install: ', this.config.packages);
await runtime.installPackage(this.config.packages);
}
await this.fetchPaths(runtime);
//This may be unnecessary - only useful if plugins try to import files fetch'd in fetchPaths()