Skip to content

Commit e3306fc

Browse files
author
Anmol Shukla
committed
Addressed comments.
1 parent 5e972c1 commit e3306fc

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/commands/init.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const showInstructions = kickStart => {
4949
* Checks if there already is a directory called 'teachcode-solutions' in the present working directory
5050
* and errors out if that is the case.
5151
*/
52-
const checkRedundantDirectory = () => {
52+
const checkIfDirExists = () => {
5353
if (
5454
fs.existsSync(`${process.cwd()}/teachcode-solutions`) ||
5555
fs.existsSync(`${process.cwd()}/config.json`)
@@ -67,19 +67,6 @@ const checkRedundantDirectory = () => {
6767
console.log();
6868
process.exit(1);
6969
}
70-
71-
console.log();
72-
console.log(
73-
chalk.greenBright(
74-
` Welcome to teachcode${`\n`.repeat(2)}${`\t`.repeat(
75-
2,
76-
)} Points to ponder ${`\n`.repeat(
77-
4,
78-
)} 1. Solution files are auto-created\n 2. Print out exactly what is required as given in the task\n 3. You have the provision to view previously submitted tasks ${`\n`.repeat(
79-
4,
80-
)}`,
81-
),
82-
);
8370
};
8471

8572
/**
@@ -95,7 +82,20 @@ const initTasks = async () => {
9582
);
9683
console.log();
9784

98-
checkRedundantDirectory();
85+
checkIfDirExists();
86+
87+
console.log();
88+
console.log(
89+
chalk.greenBright(
90+
` Welcome to teachcode${`\n`.repeat(2)}${`\t`.repeat(
91+
2,
92+
)} Points to ponder ${`\n`.repeat(
93+
4,
94+
)} 1. Solution files are auto-created\n 2. Print out exactly what is required as given in the task\n 3. You have the provision to view previously submitted tasks ${`\n`.repeat(
95+
4,
96+
)}`,
97+
),
98+
);
9999

100100
const { learningTrackOfChoice } = await inquirer.prompt([
101101
{

0 commit comments

Comments
 (0)