add the check to the CLI
This commit is contained in:
parent
2b842e267f
commit
da5d53898a
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,7 @@ import { loadMscore, INDV_DOWNLOADS, WebMscore } from './mscore'
|
||||||
import { ScoreInfo, ScoreInfoHtml, ScoreInfoObj, getActualId } from './scoreinfo'
|
import { ScoreInfo, ScoreInfoHtml, ScoreInfoObj, getActualId } from './scoreinfo'
|
||||||
import { getLibreScoreLink } from './librescore-link'
|
import { getLibreScoreLink } from './librescore-link'
|
||||||
import { escapeFilename } from './utils'
|
import { escapeFilename } from './utils'
|
||||||
|
import { isNpx, isLatest, installedVersion, latestVersion } from './npm-data'
|
||||||
import i18n from './i18n'
|
import i18n from './i18n'
|
||||||
|
|
||||||
const inquirer: typeof import('inquirer') = require('inquirer')
|
const inquirer: typeof import('inquirer') = require('inquirer')
|
||||||
|
@ -184,4 +185,8 @@ void (async () => {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
spinner.succeed('OK')
|
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.`))
|
||||||
|
}
|
||||||
})()
|
})()
|
||||||
|
|
Loading…
Reference in a new issue