We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ff28ac commit a8ac485Copy full SHA for a8ac485
1 file changed
packages/flowtest-cli/bin/index.js
@@ -46,7 +46,13 @@ const argv = yargs(hideBin(process.argv))
46
async (argv) => {
47
console.log(`Reading file: ${argv.file}`);
48
if (argv.file.toLowerCase().endsWith(`.flow`)) {
49
- const content = readFile(argv.file);
+ let content = undefined;
50
+ try {
51
+ content = readFile(argv.file);
52
+ } catch (error) {
53
+ console.error(chalk.red(`${error}`));
54
+ process.exit(1);
55
+ }
56
try {
57
const flowData = serialize(JSON.parse(content));
58
// output json output to a file
0 commit comments