no version = latest version

This commit is contained in:
Thomas Hobson 2021-04-23 11:59:54 +12:00
parent 589dfec6df
commit f683dfc2cf
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
3 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,6 @@
const chalk = require('chalk');
exports.command = ['uninstall <language> <language-version>']
exports.command = ['uninstall <language> [language-version]']
exports.aliases = ['u']
exports.describe = 'Uninstalls the named package'
@ -14,7 +14,7 @@ const msg_format = {
exports.handler = async function({axios, language, languageVersion}){
try{
const uninstall = await axios.delete(`/api/v1/packages/${language}/${languageVersion}`)
const uninstall = await axios.delete(`/api/v1/packages/${language}/${languageVersion || '*'}`)
console.log(msg_format.color(uninstall.data));
}catch({response}){