Skip to content

Commit

Permalink
fix: 优化控制台输出
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakingMan committed Feb 24, 2022
1 parent 46f1e64 commit 438f9ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/check-version.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const { execSync } = require('child_process');
const { version } = require('../package.json');
const checkVersion = () => {
const latestVersion = execSync('npm view streakingman-cli version');
const [x1, y1, z1] = latestVersion.toString().trim().split('.');
const latestVersion = execSync('npm view streakingman-cli version')
.toString()
.trim();
const [x1, y1, z1] = latestVersion.split('.');
const [x2, y2, z2] = version.split('.');
if (!(x1 === x2 && y1 === y2 && z1 <= z2)) {
console.warn(
Expand Down

0 comments on commit 438f9ab

Please sign in to comment.