Skip to content

Commit 0605056

Browse files
committed
✨ Update error message for missing schema locations
1 parent f746be5 commit 0605056

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/cli.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ const {
9191
} = cli.flags;
9292

9393
if (!leftSchemaLocation || !rightSchemaLocation) {
94-
throw new Error('Schema locations missing!');
94+
console.error(
95+
chalk.red('ERROR: Schema locations missing!\n\n'),
96+
chalk.gray(
97+
'Usage\n' +
98+
' $ graphql-schema-diff <leftSchemaLocation> <rightSchemaLocation>'
99+
)
100+
);
101+
process.exit(1);
95102
}
96103

97104
getDiff(leftSchemaLocation, rightSchemaLocation, {

0 commit comments

Comments
 (0)