Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/apollo/src/commands/client/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export default class ClientCheck extends ClientCommand {
({ type }: Change) => type === ChangeType.FAILURE
);

const exit = failures.length > 0 ? 1 : 0;

const count = operations.length;
this.log(`\n${count} operations extracted and validated`);
if (changes.length === 0) {
Expand All @@ -66,6 +64,9 @@ export default class ClientCheck extends ClientCommand {
});
this.log("\n");
// exit with failing status if we have failures
this.exit(exit);
if (failures.length > 0) {
this.exit();
}
return;
}
}
7 changes: 4 additions & 3 deletions packages/apollo/src/commands/service/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export default class ServiceCheck extends ProjectCommand {
({ type }: Change) => type === ChangeType.FAILURE
);

const exit = failures.length > 0 ? 1 : 0;

if (changes.length === 0) {
return this.log("\nNo changes present between schemas\n");
}
Expand All @@ -65,6 +63,9 @@ export default class ServiceCheck extends ProjectCommand {
});
this.log("\n");
// exit with failing status if we have failures
this.exit(exit);
if (failures.length > 0) {
this.exit();
}
return;
}
}