Skip to content

fix: add critical bug fixes and error handling - #1

Open
daveylupes wants to merge 1 commit into
Supra-Labs:mainfrom
daveylupes:fix/critical-bugs-and-validation
Open

daveylupes wants to merge 1 commit into
Supra-Labs:mainfrom
daveylupes:fix/critical-bugs-and-validation

Conversation

@daveylupes

@daveylupes daveylupes commented Dec 10, 2025

Copy link
Copy Markdown

Fixed Broken Documentation Link

  • Issue: Documentation link had [] prefix that made it unclickable/invalid
  • Before: []https://github.com/Entropy-Foundation/supra-dev-hub
  • After: https://github.com/Entropy-Foundation/supra-dev-hub

Added Directory Existence Check

  • Issue: CLI would attempt to overwrite existing directories, causing errors
  • Fix: Added check to prevent overwriting existing directories with clear error message

Removed Unused Import

  • Issue: execSync was imported but never used
  • Fix: Removed unused import for cleaner code

Project Name Validation

  • Validates project names to ensure they only contain allowed characters (letters, numbers, hyphens, underscores)
  • Prevents empty project names
  • Provides clear error messages for invalid input

Comprehensive Error Handling

  • Added try-catch blocks around file operations
  • Graceful error handling for template directory reading
  • Automatic cleaclean-up partially created directories on error
  • Clear, user-friendly error messages

Template Directory Validation

  • Checks if templates directory exists before reading
  • Validates that templates are available
  • Handles edge cases with appropriate error messages

@daveylupes

Copy link
Copy Markdown
Author

Hi @supra-bharatjain, I’ve submitted this PR to improve the robustness and Developer Experience (DX) of the CLI tool.

I'm a big fan of what the team is building and wanted to help make the onboarding process as smooth as possible for new devs!

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