Skip to content

Commit e8d8304

Browse files
authored
Merge pull request #370 from jamesgeorge007/feat/refactor
Minor refactor resulting in concise code
2 parents 5d2af9c + 6a64c4f commit e8d8304

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,7 @@ module.exports = function (argv: string[]): void {
138138
help = `${help}
139139
Unknown command '${cmd}'`;
140140

141-
if (suggestion) {
142-
help = `${help}, did you mean '${suggestion}'?`;
143-
} else {
144-
help = `${help}.`;
145-
}
146-
147-
return `${help}
148-
`;
141+
return suggestion ? `${help}, did you mean '${suggestion}'?\n` : `${help}.\n`;
149142
});
150143
});
151144

0 commit comments

Comments
 (0)