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: init sage in repository not working #453

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

antonmoller
Copy link
Contributor

If merged this PR will fix the init command returning the error .sage: file exists. This was caused by a recent addition of ensureParentDir to FromBinDir. The function sg.Command uses FromBinDir which causes the .sage directory to already be created when os.Mkdir is called in initSage
image

@antonmoller antonmoller added the bug Something isn't working label Aug 4, 2023
Copy link
Member

@odsod odsod left a comment

Choose a reason for hiding this comment

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

Nice catch! Maybe we should also fix the ensureParentDirectory function to not create the parent dir if it already exists?

@antonmoller
Copy link
Contributor Author

Nice catch! Maybe we should also fix the ensureParentDirectory function to not create the parent dir if it already exists?

Sounds like a good idea I can look into it

@antonmoller antonmoller merged commit 22b48cd into master Aug 7, 2023
3 checks passed
@antonmoller antonmoller deleted the fix-file-exists-on-init branch August 7, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants