Skip to content

Commit fd2f8fe

Browse files
Show spinner during update
1 parent 9da3acf commit fd2f8fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,19 @@ function init(flags) {
108108
}
109109

110110
function update() {
111+
const spinner = ora('Updating ...').start();
111112
const file = 'onepunch.json';
112113

113114
if (!fs.existsSync(file)) {
114-
abort('File onepunch.json is not present. Are you sure this is the right directory?');
115+
abort(`File ${chalk.underline('onepunch.json')} is not present. Are you sure this is the right directory?`, spinner);
115116
}
116117

117118
fs.copySync(
118119
path.resolve(__dirname, 'template/src'),
119120
'src',
120121
{overwrite: true},
121122
);
123+
spinner.succeed(`Directory ${chalk.underline('src')} has been updated to release ${cli.pkg.version}.`);
122124
}
123125

124126
function print(flags) {

0 commit comments

Comments
 (0)