packages/upgradable/lib/start/index.js
async function start ({latest, message, name, version}) {
	if (beenthere) {
		return;
	}

	beenthere = true;

	console.log( // eslint-disable-line no-console
		box({
			latest,
			message,
			name,
			version,
		})
	);

	const Confirm = require('prompt-confirm');
	const confirmed = await new Confirm(
		`install ${name.yellow} version ${latest.yellow} globally?`
	).run();

	if (!confirmed) {
		process.exit(); // eslint-disable-line no-process-exit
	}

	await require('../install-latest')(name);
	process.exit(); // eslint-disable-line no-process-exit
}
async function start ({latest, message, name, version}) {
	if (beenthere) {
		return;
	}

	beenthere = true;

	console.log( // eslint-disable-line no-console
		box({
			latest,
			message,
			name,
			version,
		})
	);

	const Confirm = require('prompt-confirm');
	const confirmed = await new Confirm(
		`install ${name.yellow} version ${latest.yellow} globally?`
	).run();

	if (!confirmed) {
		process.exit(); // eslint-disable-line no-process-exit
	}

	await require('../install-latest')(name);
	process.exit(); // eslint-disable-line no-process-exit
}
async function start ( { latest , message , name , version } ) { if ( beenthere ) { return ; } beenthere = true ; console . log ( // eslint-disable-line no-console box ( { latest , message , name , version , } ) ) ; const Confirm = require ( 'prompt-confirm' ) ; const confirmed = await new Confirm ( ` ${ name . yellow } ${ latest . yellow } ` ) . run ( ) ; if ( ! confirmed ) { process . exit ( ) ; // eslint-disable-line no-process-exit } await require ( '../install-latest' ) ( name ) ; process . exit ( ) ; // eslint-disable-line no-process-exit }
Start checking for upgrades
@param   {Info} info Information about the package
@returns {undefined} No return value
Start checking for upgrades