diff --git a/utils/check-version.js b/utils/check-version.js index 4dbec93..5ef8260 100644 --- a/utils/check-version.js +++ b/utils/check-version.js @@ -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(