diff --git a/api/src/ppman/package.js b/api/src/ppman/package.js index 0be9822..21c7f16 100644 --- a/api/src/ppman/package.js +++ b/api/src/ppman/package.js @@ -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}) diff --git a/api/src/ppman/routes.js b/api/src/ppman/routes.js index 4df95f6..89f472c 100644 --- a/api/src/ppman/routes.js +++ b/api/src/ppman/routes.js @@ -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); diff --git a/cli/commands/ppman_commands/uninstall.js b/cli/commands/ppman_commands/uninstall.js index 11c7e4c..c8230ae 100644 --- a/cli/commands/ppman_commands/uninstall.js +++ b/cli/commands/ppman_commands/uninstall.js @@ -2,7 +2,7 @@ const chalk = require('chalk'); exports.command = ['uninstall '] exports.aliases = ['u'] -exports.describe = 'Installs the named package' +exports.describe = 'Uninstalls the named package' const msg_format = { @@ -14,9 +14,9 @@ const msg_format = { exports.handler = async function({axios, language, languageVersion}){ try{ - const install = await axios.delete(`/packages/${language}/${languageVersion}`) + const uninstall = await axios.delete(`/packages/${language}/${languageVersion}`) - console.log(msg_format.color(install.data)); + console.log(msg_format.color(uninstall.data)); }catch({response}){ console.error(response.data.message) }