-
Notifications
You must be signed in to change notification settings - Fork 61
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
Relative path to the build directory is treated like absolute #128
Comments
Interesting. The code that makes it happen is right here: def init_build_dir(self):
"""
Clear out the build directory and create a new one.
"""
# Destroy the build directory, if it exists
logger.debug("Initializing %s" % self.build_dir)
if self.verbosity > 1:
self.stdout.write("Initializing build directory")
if self.fs.exists(self.build_dir):
self.fs.removetree(self.build_dir)
# Then recreate it from scratch
self.fs.makedirs(self.build_dir) Anything look off? |
That will always assume a full path.
So something like this: |
Okay. I'm open to a change along these lines, but I'd like to add some testing to verify its working now and in the future. What different path inputs could you imagine we should test for? |
I would think these:
Can't think of anything else. |
@ClaudiuCreanga, would you be interested in developing a patch to solve this problem? |
When using the command line:
python manage.py build report.views.RenderView --build-dir ./build
bakery tries to create the top level directory /build and fails because of permissions.
fs.errors.PermissionDenied: permission denied mkdir: ./build: No such file or directory
It should instead create it in the current directory because there is a dot in front.
Is this by design?
It is not something that one cannot get around, but when using singularity and some workflow systems (nextflow), using absolute paths may become messy, as you're working with isolated directories.
The text was updated successfully, but these errors were encountered: