You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When projects being built by nixpacks contain read-only files, nipacks build ... results in a permission error due to Rust's fs::copy retaining file permissions, and nixpacks rewriting all CRLF line endings with LF:
And stat shows us that that file retained its original read-only permissions, preventing the writable file handle
stat -c "%a %n" /run/user/1000/nixpacks.k4jRGy09qM0S/test
444 /run/user/1000/nixpacks.k4jRGy09qM0S/test
Expected behavior
Nixpacks builds successfully as long as it can read files from project directories
That nixpacks does not replace all CRLF with LF in project files.
Environment
OS: NixOS Unstable
Kernel: Linux version 6.6.17 (nixbld@localhost) (gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 16 18:10:57 UTC 2024
Nixpacks version: 1.20.0 / any
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
When projects being built by
nixpacks
contain read-only files,nipacks build ...
results in a permission error due to Rust's fs::copy retaining file permissions, and nixpacks rewriting all CRLF line endings with LF:nixpacks/src/nixpacks/files.rs
Line 35 in 2ec70b7
To reproduce
In any project to be built by nixpacks, on a Linux system
Here from the
strace
output, we can see that the permission error occurs openingtest
as writableAnd
stat
shows us that that file retained its original read-only permissions, preventing the writable file handleExpected behavior
Environment
OS: NixOS Unstable
Kernel: Linux version 6.6.17 (nixbld@localhost) (gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.40) #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 16 18:10:57 UTC 2024
Nixpacks version: 1.20.0 / any
The text was updated successfully, but these errors were encountered: