Skip to content

Commit

Permalink
fix npm updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Donmclean committed Aug 6, 2017
1 parent 28d8b8a commit 5fcd29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/riko.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import program from 'commander';
import path from 'path';
import { packageJson } from './utils/variables';
import { genericLog, logOptionsError, processBeforeExitHandler } from './utils/functions';
import { genericLog, logOptionsError, checkForNewPackageVersion } from './utils/functions';
const commandsDir = path.resolve(__dirname, './cmds');

processBeforeExitHandler();
checkForNewPackageVersion();

//VERSION, USAGE, ETC
program
Expand Down
9 changes: 1 addition & 8 deletions src/utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,7 @@ export const processExitHandler = () => process.on('SIGINT', () => {
process.exit(0);
});

export const checkForNewPackageVersion = () => {
const notifier = updateNotifier({pkg: packageJson});
notifier.notify();
};

export const processBeforeExitHandler = () => process.on('beforeExit', (code) => {
process.exit(code);
});
export const checkForNewPackageVersion = () => updateNotifier({pkg: packageJson}).notify({defer: true});

export const hotExecuteFlowTests = (customConfig) => {

Expand Down

0 comments on commit 5fcd29c

Please sign in to comment.