Allow users to ignore config files in the package.#936
Allow users to ignore config files in the package.#936Alexhuszagh wants to merge 1 commit intocross-rs:mainfrom
Conversation
7d7933e to
41f9ba9
Compare
bb1f3d7 to
87d650b
Compare
|
I've moved the configuration to |
87d650b to
a6a5e9f
Compare
| paths: &DockerPaths, | ||
| ignore_cargo_config: bool, | ||
| ) -> Result<()> { | ||
| let check_mount = |
There was a problem hiding this comment.
This checks if the path exists on the host (canonicalized), and only if it does, mounts it. This avoids any permission issues or creating undesired directories.
| let mount_root = Path::new(paths.mount_root()); | ||
| let mount_cwd = Path::new(paths.mount_cwd()); | ||
| check_mount(docker, &paths.cwd, mount_cwd, Path::new(""))?; | ||
| // CWD isn't guaranteed to be a subdirectory of the mount root. |
There was a problem hiding this comment.
Since we've removed /project, this changes the logic here, so we don't necessarily have a relpath to the workspace root.
a6a5e9f to
7e93d02
Compare
Adds the `CROSS_BUILD_ENV_IGNORE_CARGO_CONFIG` environment variable, which if set will mount an anoymous data volume for each `.cargo` subdirectory for the current directory and any parent directories up to the workspace root. If the build is called outside the workspace root or at the workspace root, only mount at the `$PWD/.cargo`.
7e93d02 to
c1af3bd
Compare
|
I'm likely going to merge this into a PR with #931, since the two are complimentary and I also need that to support allowing full passing of Cargo configuration files to cross. So, we can therefore have the default behavior ( |
|
Superseded by #931, which now includes this functionality. |
Adds the
CROSS_IGNORE_CARGO_CONFIGenvironment variable, which if set will mount an anoymous data volume for each.cargosubdirectory for the current directory and any parent directories up to the workspace root. If the build is called outside the workspace root or at the workspace root, only mount at the$PWD/.cargo.Partially addresses #621.