We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 592b025 commit bf73119Copy full SHA for bf73119
index.js
@@ -135,10 +135,12 @@ class UpdateNotifier {
135
136
if (options.isYarnGlobal) {
137
installCommand = `yarn global add ${this.packageName}`;
138
+ } else if (options.isGlobal) {
139
+ installCommand = `npm i -g ${this.packageName}`;
140
} else if (hasYarn()()) {
141
installCommand = `yarn add ${this.packageName}`;
142
} else {
- installCommand = `npm i ${options.isGlobal ? '-g ' : ''}${this.packageName}`;
143
+ installCommand = `npm i ${this.packageName}`;
144
}
145
146
options.message = options.message || 'Update available ' + chalk().dim(this.update.current) + chalk().reset(' → ') +
0 commit comments