add the check to the CLI

This commit is contained in:
Ruben Vergani 2021-01-15 09:02:48 +01:00
parent 2b842e267f
commit da5d53898a
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import { loadMscore, INDV_DOWNLOADS, WebMscore } from './mscore'
import { ScoreInfo, ScoreInfoHtml, ScoreInfoObj, getActualId } from './scoreinfo'
import { getLibreScoreLink } from './librescore-link'
import { escapeFilename } from './utils'
import { isNpx, isLatest, installedVersion, latestVersion } from './npm-data'
import i18n from './i18n'
const inquirer: typeof import('inquirer') = require('inquirer')
@ -184,4 +185,8 @@ void (async () => {
}),
)
spinner.succeed('OK')
if (!(await isNpx()) && !(await isLatest())) {
console.log(chalk.yellowBright(`Your installed version (${await installedVersion()}) of the musescore-downloader CLI is not the latest one (${await latestVersion()})!\nRun npm i -g musescore-downloader to update.`))
}
})()