Skip to content

Commit a59e063

Browse files
committed
bug fixes
1 parent 7193fed commit a59e063

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

dest/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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
});

src/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)