Skip to content

Commit eec4c6d

Browse files
committed
Remove figlet problem short-circuit
If there’s a problem rendering the ASCII-art banner, the program will exit before doing anything useful and with no error message. Arguably, a user would prefer the program to continue setting up the ReactXP project even if they don’t get to see the banner in its full glory. This change allows the program to continue executing even in the unlikely event that figlet reports a problem, instead falling-back to a regular text output for the banner.
1 parent 6649660 commit eec4c6d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/build.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ const build = (appName) => {
4949
font: 'Graffiti'
5050
}, function(err, data) {
5151
if (err) {
52-
return;
52+
console.log(chalk.white.bold('React XP'));
53+
} else {
54+
console.log(data);
5355
}
54-
console.log(data);
5556
console.log('----------------------------------------------------------');
5657
console.log(chalk.green.bold('Welcome to ReactXP'));
5758
console.log('----------------------------------------------------------');

0 commit comments

Comments
 (0)