Improve init command: create directory if missing and normalize path#857
Open
iron-prog wants to merge 1 commit intoMemPalace:developfrom
Open
Improve init command: create directory if missing and normalize path#857iron-prog wants to merge 1 commit intoMemPalace:developfrom
iron-prog wants to merge 1 commit intoMemPalace:developfrom
Conversation
Author
|
Happy to adjust the approach if there's a preferred pattern for handling directory creation here. |
This was referenced Apr 14, 2026
bensig
approved these changes
Apr 15, 2026
Author
|
any update on this ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR improves the mempalace init
command by making it more user-friendly and robust.How to test
• Automatically creates the target directory if it does not exist
• Normalizes the provided path using Path.resolve() to ensure consistency across the application
Previously, the command assumed the directory already existed, which could lead to errors or confusion during initial setup.
Checklist
python -m pytest tests/ -v)ruff check .)This issue was encountered during local setup, where init failed if the directory didn’t exist. This change aligns the behavior with common CLI tools and improves the developer experience.