Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
fix update notification
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenDjango committed Aug 30, 2020
1 parent 7dcacbf commit f5087b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prod/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function check_update(current) {
child_process_1.exec('npm v blih_cli@latest version --silent', (err, stdout, stderr) => {
if (err || !stdout)
return;
if ('v' + stdout !== current) {
if (stdout.includes(current.slice(1)) === false) {
// prettier-ignore
child_process_1.exec(`notify-send "New update available" "Try 'sudo npm up blih_cli -g' to update" -i "${__dirname}/../logo.png" -a "blih cli" -t 10000`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function check_update(current: string) {
if (os.type() === 'Linux' || os.type().match(/BSD$/)) {
exec('npm v blih_cli@latest version --silent', (err, stdout, stderr) => {
if (err || !stdout) return
if ('v' + stdout !== current) {
if (stdout.includes(current.slice(1)) === false) {
// prettier-ignore
exec(`notify-send "New update available" "Try 'sudo npm up blih_cli -g' to update" -i "${__dirname}/../logo.png" -a "blih cli" -t 10000`)
}
Expand Down

0 comments on commit f5087b3

Please sign in to comment.