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

Develop #375

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

Develop #375

wants to merge 3 commits into from

Conversation

syavaYki
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on structuring your code to handle file operations effectively! 🎉 While your solution meets the task requirements, there are a few critical issues that need attention. Ensure you update the condition to check for the correct number of arguments (args.length !== 2) and add process.exit(1); after logging errors to indicate an error status. Keep up the good work and happy coding! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

src/app.js Outdated

console.log('Command-line arguments:', args);

if (args.length === 4) {

Choose a reason for hiding this comment

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

The condition args.length === 4 is incorrect for checking the number of command-line arguments. It should be args.length !== 2 to ensure exactly two arguments (source and destination) are provided.

src/app.js Outdated
Comment on lines 25 to 26
console.error('Source is not a file.');
}

Choose a reason for hiding this comment

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

After logging the error 'Source is not a file.', the program should exit with a non-zero status to indicate an error. Consider adding process.exit(1); here.

src/app.js Outdated
Comment on lines 32 to 33
console.error('Destination is a directory.');
}

Choose a reason for hiding this comment

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

After logging the error 'Destination is a directory.', the program should exit with a non-zero status to indicate an error. Consider adding process.exit(1); here.

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.

2 participants