Skip to content

Commit a7be776

Browse files
committed
Fix error handling
1 parent 12621b9 commit a7be776

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

_new/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ module.exports = class extends Generator {
9999
.map(path.normalize)
100100
.map(file => file.replace(/\\/g, '/'))
101101
.concat([new inquirer.Separator(), 'Other']);
102-
} catch (e) {
103-
console.error(e);
102+
} catch (err) {
103+
this.log.error(
104+
'There was an unexpected error retrieving files: \n %O',
105+
err
106+
);
107+
108+
return ['Other'];
104109
}
105110
},
106111
default: answers =>

0 commit comments

Comments
 (0)