Skip to content

Conversation

@jackchuka
Copy link
Owner

This pull request improves the reliability of file output operations in the mdschema CLI by ensuring that any necessary directories are created before writing output files. This prevents errors when the specified output path includes directories that do not yet exist.

Key improvements by theme:

Output file handling enhancements:

  • Before writing to an output file, the code now checks if the parent directory exists and creates it if necessary in derive.go, generate.go, and schema.go using os.MkdirAll with appropriate permissions. [1] [2] [3]
  • Added imports for the filepath package in all three command files to support directory path operations. [1] [2] [3]

@jackchuka jackchuka marked this pull request as ready for review January 29, 2026 11:18
@jackchuka jackchuka merged commit 4c2ca86 into main Jan 29, 2026
1 check passed
@jackchuka jackchuka deleted the feat/cmd/output-nested-dir branch January 29, 2026 11:18
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