We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d6d5d4 commit 85a4bf0Copy full SHA for 85a4bf0
src/cli.ts
@@ -46,6 +46,7 @@ program
46
ignorePrettierErrors: !!program.ignorePrettierErrors,
47
};
48
const files = glob.sync(globPattern, {});
49
+ let errors = false;
50
for (const file of files) {
51
const filePath = path.resolve(file);
52
const newPath = filePath.replace(/\.jsx?$/, '.tsx');
@@ -60,13 +61,17 @@ program
60
61
} catch (error) {
62
console.warn(`Failed to convert ${file}`);
63
console.warn(error);
64
+ errors = true;
65
}
66
if (!program.keepTemporaryFiles) {
67
if (fs.existsSync(temporaryPath)) {
68
fs.unlinkSync(temporaryPath);
69
70
71
72
+ if (errors) {
73
+ process.exit(1);
74
+ }
75
});
76
77
program.parse(process.argv);
0 commit comments