Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #343

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

RostyslavSharuiev
Copy link

No description provided.

Copy link

@igorkruz igorkruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 🔥
Let's improve your solution

src/app.js Outdated
rl.close();
};

rl.question('', handleUserInput);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rl.question('', handleUserInput);
rl.question('Enter command: ', handleUserInput);

src/app.js Outdated

console.log('File copied successfully');
} catch (error) {
console.error(error);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed error messages to be more descriptive

Suggested change
console.error(error);
console.error('Error during file copy:', error.message);


return;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add validation to ensure both the source and destination are provided

Suggested change
if (!src || !dest) {
console.error('Error: Please provide both source and destination files.');
rl.close();
return;
}

@RostyslavSharuiev
Copy link
Author

I have a question: why do tests go into an infinite loop and how do we solve this issue?

Copy link

@KosolapovAnatolii KosolapovAnatolii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything completed and looking good 🔥
I'll come back later to you private chat with an answer to the question ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants