Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
CGWebDev2003 committed Sep 3, 2024
1 parent 5046b72 commit 9607737
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ var projectLanguages = [
'React'
] ;

const projectTitle = "my-project";

const program = new Command();

program
Expand Down Expand Up @@ -105,6 +107,7 @@ program
terminal.inputField((error, projectName) => {
if (error) {
console.error('Error:', error);
projectTitle = projectName;
process.exit(1);
}

Expand Down Expand Up @@ -169,7 +172,7 @@ program
case 'React':
console.log('React project selected.');

exec('npm create-react-project ' + projectName, (error, stdout, stderr) => {
exec('npx create-react-project ' + projectTitle, (error, stdout, stderr) => {
if (error) {
console.error(`Error: ${error.message}`);
return;
Expand Down

0 comments on commit 9607737

Please sign in to comment.