-
Notifications
You must be signed in to change notification settings - Fork 518
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
"mv: can't preserve ownership of ..." when running rebar3 compile #1324
Comments
We do rely on the .git directory to validate versions, so that isn't a good idea. Would removing file permissions risk breaking some files (say pre-written escripts) which require executable rights? In such a case, I don't think dropping permissions would be acceptable. |
I understand. A third, and better, solution then is to keep using |
Alternatively, clone the files directly in the destination directory (instead of first in |
Yeah, this allows to avoid clearing up the directory if it exists first, I believe, which is faster. It would be a good idea to possibly just parse the return value and promote it to a warning and see it as a success however, rather than a fatal error in this case. I like that solution personally. |
Agreed on the solution. I’ll try to make some time and a PR. 😉 |
Thanks! Let us know if you need any help and we'll be glad to provide it! |
Environment
Current behaviour
Rebar clones the dependencies in
/tmp
and then moves them to their destination path. However,mv
tries to preserve permissions, which doesn’t always work when moving the files to a different filesystem than/tmp
is on. My use case: a Docker container running on Docker for Mac, which relies on thefuse.osxfs
filesystem.Expected behaviour
Installing the dependencies should work even if file permissions can’t be guaranteed. Some possible solutions:
cp && rm
the files, as copy will not try to preserve file permissions. This may be slower, however, when moving within the same filesystem.The problematic files, that are owned
444
, are only in the.git
directory:So another solution is to
rm .git
before the file is moved. Or does Rebar rely on the.git
directory in the dependency directories?The text was updated successfully, but these errors were encountered: