Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Jun 25, 2020
1 parent 9620316 commit 0d56ad9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/zbctl
Expand Up @@ -17,8 +17,8 @@ const version = pkg.version;

const args = process.argv.slice(2);

if (args && args.length > 0 && args[0] === 'version') {
console.log(`NPM package version: ${version}`)
if (args && args.length > 0 && args[0] === "version") {
console.log(`NPM package version: ${version}`);
}

const child = spawnSync(binary, [...args]);
Expand All @@ -27,14 +27,14 @@ child.error && console.error(child.error.toString());
console.log(child.stdout.toString());
console.error(child.stderr.toString());

doUpdateCheck();
doUpdateCheck().then(() => process.exit(child.status));

async function doUpdateCheck() {
let update = null;

try {
update = await checkForUpdate(pkg, {
interval: 60000 // For how long to cache latest version (default: 1 day)
interval: 60000, // For how long to cache latest version (default: 1 day)
});
} catch (err) {
console.error(`Failed to check for updates: ${err}`);
Expand Down

0 comments on commit 0d56ad9

Please sign in to comment.