Skip to content

Commit 8b9d3b9

Browse files
committed
address @cknitt comments
1 parent 45633c0 commit 8b9d3b9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/rescript_format.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ async function formatFiles(files, bsc_exe, isSupportedFile, checkFormatting) {
7979
const _promises = await Promise.all(
8080
files.map(async file => {
8181
if (isSupportedFile(file)) {
82-
// console.log(`processing ${arg}`);
8382
const flags = checkFormatting
8483
? ["-format", file]
8584
: ["-o", file, "-format", file];
@@ -100,13 +99,13 @@ async function formatFiles(files, bsc_exe, isSupportedFile, checkFormatting) {
10099
process.exit(2);
101100
}
102101
if (incorrectlyFormattedFiles > 0) {
103-
console.error(
104-
`${incorrectlyFormattedFiles} file${
105-
incorrectlyFormattedFiles > 1 ? "s" : ""
106-
} listed above need${
107-
incorrectlyFormattedFiles > 1 ? "" : "s"
108-
} formatting.`
109-
);
102+
if (incorrectlyFormattedFiles == 1) {
103+
console.error("The file listed above needs formatting");
104+
} else {
105+
console.error(
106+
`The ${incorrectlyFormattedFiles} files listed above need formatting`
107+
);
108+
}
110109
process.exit(3);
111110
}
112111
}

0 commit comments

Comments
 (0)