Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
fix: sets version checker to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
redreceipt committed Jun 3, 2022
1 parent 34b2034 commit 323449c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import util from 'util';
import { exec as baseExec } from 'child_process';
import { execa } from 'execa';
import { execaSync } from 'execa';
import consola from 'consola';
import { program } from 'commander';

Expand All @@ -16,14 +16,12 @@ program.name('apollos');
program.version(version);

// check version
(async () => {
const { stdout: latest } = await execa(`${scriptsDir}/get-latest-version.sh`);
if (latest !== version) {
consola.warn(
`Apollos CLI current version: ${version}. Newer version is available: ${latest}`,
);
}
})();
const { stdout: latest } = execaSync(`${scriptsDir}/get-latest-version.sh`);
if (latest !== version) {
consola.warn(
`Apollos CLI current version: ${version}. Newer version is available: ${latest}`,
);
}

program.addCommand(makeMobileCommand());

Expand Down

0 comments on commit 323449c

Please sign in to comment.