pkg(*-*): Fix uninstall (#213)

This commit is contained in:
Dan Vargas 2021-04-10 20:15:14 -05:00 committed by GitHub
parent 81cdc766b6
commit d2e05a4a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -136,10 +136,10 @@ class Package {
logger.info(`Uninstalling ${this.language}-${this.version.raw}`);
logger.debug("Finding runtime")
const runtime = runtime.get_latest_runtime_matching_language_version(this.language, this.version.raw);
const found_runtime = runtime.get_latest_runtime_matching_language_version(this.language, this.version.raw);
logger.debug("Unregistering runtime")
runtime.unregister();
found_runtime.unregister();
logger.debug("Cleaning files from disk")
await fs.rmdir(this.install_path, {recursive: true})

View file

@ -91,7 +91,7 @@ module.exports = {
// DELETE /packages/:language/:version
async package_uninstall(req, res) {
logger.debug('Request to install package');
logger.debug('Request to uninstall package');
const pkg = await get_package(req.params.language, req.params.version);