dockerTools: only add "/nix" if it exists
The /nix path in 4d200538 of the layer tar didn't exist for some packages, such as cacert. This is because cacert just creates an /etc directory and doesn't depend on any other /nix paths. If we tried putting this directory in the tar and using overlayfs with it, we'd get "Invalid argument" when trying to remove the directory. We now check whether the closure is non-empty before telling tar to store the /nix directory. Fixes #14710.
parent
8b3c4348
Please register or sign in to comment