LukeMathWalker / cargo-chef

A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.
Apache License 2.0
1.81k stars 117 forks source link

fix: Run `cargo metadata` in offline mode #210

Closed asandroq closed 1 year ago

asandroq commented 1 year ago

This restores the old behaviour of cargo chef prepare which would finish quickly and not need Git credentials for private repos.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LukeMathWalker commented 1 year ago

I'm afraid this would cause the command to fail unless crates had been downloaded beforehand.

asandroq commented 1 year ago

Yes, I've just realised that :-(

asandroq commented 1 year ago

I've creates a new one, which seems to work: https://github.com/LukeMathWalker/cargo-chef/pull/211