File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,15 +20,10 @@ inquirer
2020 // writeFileSync(path+'/template.cpp',template);
2121 fs . readFileSync ( `/home/abhinav/cpp_templates/${ answers . template } ` , "utf8" ) ;
2222 fs . copyFile ( `/home/abhinav/cpp_templates/${ answers . template } ` , cwd + `/${ name } .cpp` , ( err ) => {
23- console . log ( err ) ;
23+ // console.log(err);
2424 } ) ;
2525 console . log ( "your template is ready 🎉" ) ;
2626} )
2727 . catch ( ( error ) => {
28- if ( error . isTtyError ) {
29- console . log ( error ) ;
30- }
31- else {
32- console . log ( error ) ;
33- }
28+ console . log ( error ) ;
3429} ) ;
Original file line number Diff line number Diff line change @@ -24,14 +24,10 @@ inquirer
2424 // writeFileSync(path+'/template.cpp',template);
2525 fs . readFileSync ( `/home/abhinav/cpp_templates/${ answers . template } ` , "utf8" ) ;
2626 fs . copyFile ( `/home/abhinav/cpp_templates/${ answers . template } ` , cwd + `/${ name } .cpp` , ( err : any ) => {
27- console . log ( err ) ;
27+ // console.log(err);
2828 } )
2929 console . log ( "your template is ready 🎉" ) ;
3030 } )
31- . catch ( ( error : { isTtyError : any ; } ) => {
32- if ( error . isTtyError ) {
33- console . log ( error )
34- } else {
35- console . log ( error ) ;
36- }
31+ . catch ( ( error : any ) => {
32+ console . log ( error )
3733 } ) ;
You can’t perform that action at this time.
0 commit comments