bail when not installed

This commit is contained in:
Thomas Hobson 2021-04-23 14:29:40 +12:00
parent 09983a5fa5
commit 6ff89f6e91
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,11 @@ class Package {
logger.debug("Finding runtime")
const found_runtime = runtime.get_latest_runtime_matching_language_version(this.language, this.version.raw);
if(!found_runtime){
logger.error(`Uninstalling ${this.language}-${this.version.raw} failed: Not installed`)
return
}
logger.debug("Unregistering runtime")
found_runtime.unregister();