Skip to content

Commit

Permalink
feature: warn & exit on config file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adelsz committed Jan 27, 2023
1 parent 102ffc2 commit 2515f15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cli/src/index.ts
Expand Up @@ -185,6 +185,10 @@ if (isWatchMode && fileOverride) {
}

try {
chokidar.watch(configPath).on('change', () => {
console.log('Config file changed. Exiting.');
process.exit();
});
const config = parseConfig(configPath, connectionUri);
main(config, isWatchMode || false, fileOverride).catch((e) =>
debug('error in main: %o', e.message),
Expand Down

1 comment on commit 2515f15

@vercel
Copy link

@vercel vercel bot commented on 2515f15 Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pgtyped – ./

pgtyped.vercel.app
pgtyped-adels.vercel.app
pgtyped-git-master-adels.vercel.app

Please sign in to comment.