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

fix: Improved error handling and input validation for project name in… #362

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ursulabauer
Copy link

Description

I’ve added a validation to ensure that the second argument (project name) is provided via the command line. If the project name is missing, the script will terminate with an appropriate error message, making it easier for users to understand what went wrong.

Additionally, I’ve wrapped the file reading and writing operations in a try...catch block. This will allow the script to catch and display more detailed error messages when there are issues interacting with files.

Finally, I’ve included a success message that confirms the file update has been successfully completed.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn style without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

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.

1 participant