Skip to content

Commit

Permalink
refactor: don't load logger in cli.js
Browse files Browse the repository at this point in the history
cli.js is a low-level, minimal entrypoint.
  • Loading branch information
justinmk committed Mar 18, 2024
1 parent 5c139b5 commit 6d2cfb6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/neovim/bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node
const { Host } = require('../lib/host');
const { getLogger } = require('../lib/utils/logger');
const { spawnSync } = require('child_process');

// node <current script> <rest of args>
Expand Down Expand Up @@ -35,9 +34,9 @@ try {
const host = new Host(args);
host.start({ proc: process });
} catch (err) {
getLogger().error(err);
process.stderr.write(`failed to start Nvim plugin host: ${err.name}: ${err.message}\n`);
}

process.on('unhandledRejection', (reason, p) => {
getLogger().info('Unhandled Rejection at:', p, 'reason:', reason);
process.stderr.write(`Unhandled Rejection at: ${p} reason: ${reason}`);
});

0 comments on commit 6d2cfb6

Please sign in to comment.