-
Notifications
You must be signed in to change notification settings - Fork 23
Create parent directories. #106
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
base: master
Are you sure you want to change the base?
Conversation
Where parent directory creation is needed, shutil/create-dirs is called before os/mkdir. Otherwise, jpm may crash with errors.
|
Not sure who's responsibility it should be to make sure all of the directories have been created. In any case, if they are going to be created, may be there should be attempts for the following locations too? It's true that in the latter case, However, |
|
(create-dirs metaname) makes an above os/mkdir call redundant.
|
Thanks for your thoughts. I think even if some of these bits are redundant now, they might not be later if the code changes. I read the insertion of The attempt at optimizing based on earlier parts of functions that have definitions that extend beyond a single screen [1] seems like a potentially fragile thing to me. I doubt the extra calls to In any case, if the current state of the PR helps to solve your situation, may be that's really the main thing that counts. [1] It is much harder to hold the entirety of the definition in one's head compared to if you can see the whole thing on the screen and consequently my sense is that one's processing of the content could be adversely affected. For reference, |
|
I guess download-git-bundle and download-tar-bundle shouldn't be in public API. I will wait for bakpakin. |
|
Waiting for comments sounds fine, but at this point, they have already been public for quite some time [1], I'm not sure it's a great idea to make them private at this point from the perspective of preventing breakage. Also, the two functions are advertised at the janet-lang.org site: [1] That looks like over 4 years to me. |
Where parent directory creation is needed, shutil/create-dirs is called before os/mkdir. Otherwise, jpm may crash with errors.
I tested this pull request against spork on my gentoo system. It works.
It fixes #104.