Skip to content

Commit

Permalink
fix cli stderr bug
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Jul 10, 2022
1 parent 2074061 commit 9f8cedc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/graphql-language-service-cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ if (!command) {
switch (command) {
case 'server':
process.on('uncaughtException', error => {
process.stdout.write(
process.stderr.write(
'An error was thrown from GraphQL language service: ' + String(error),
);
process.exit(0);
// don't exit at all if there is an uncaughtException
// process.exit(0);
});

const options: { [key: string]: any } = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,8 @@ describe('getAutocompleteSuggestions', () => {
{ label: 'skip' },
];

console.log({ graphQLVersion });

// TODO: remove this once defer and stream are merged to `graphql`
if (graphQLVersion.startsWith('16.0.0-experimental-stream-defer')) {
console.log('expect stream');
expectedDirectiveSuggestions.push({ label: 'stream' }, { label: 'test' });
} else {
expectedDirectiveSuggestions.push({ label: 'test' });
Expand Down
1 change: 1 addition & 0 deletions packages/vscode-graphql/src/apis/statusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
ThemeColor,
version,
} from 'vscode';

import { LanguageClient, State } from 'vscode-languageclient/node';

enum Status {
Expand Down

0 comments on commit 9f8cedc

Please sign in to comment.