yeoman / update-notifier

Update notifications for your CLI app
BSD 2-Clause "Simplified" License
1.76k stars 132 forks source link

Needs a better update command notification. #161

Closed vivaxy closed 5 years ago

vivaxy commented 5 years ago

Environment

Expected behaviour

Showing npm i -g package or yarn add package --global

Actual behaviour

Showing yarn add package

Discussion

It's better to have the logic as:

if (installed package with yarn global) {
  return 'yarn add package --global'
}
if (installed package with npm global) {
  return 'npm i -g package'
}
if (has yarn) {
  return 'yarn add package'
}
return 'npm i package'