Skip to content
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

--offline, --locked, --frozen and --config are not passed to cargo metadata #83

Closed
Shnatsel opened this issue Nov 12, 2022 · 1 comment · Fixed by #84
Closed

--offline, --locked, --frozen and --config are not passed to cargo metadata #83

Shnatsel opened this issue Nov 12, 2022 · 1 comment · Fixed by #84
Labels
bug Something isn't working fixed by upstreaming Will no longer be a problem if `auditable` is upstreamed into Cargo

Comments

@Shnatsel
Copy link
Member

Running cargo auditable build --offline will make cargo metadata still try to access the network, because cargo auditable does not pass on this argument to cargo metadata.

According to cargo help metadata, this may impact dependency resolution, so this may make the audit info inaccurate:

       --offline
           Prevents Cargo from accessing the network for any reason. Without this flag, Cargo
           will stop with an error if it needs to access the network and the network is not
           available. With this flag, Cargo will attempt to proceed without the network if
           possible.

           Beware that this may result in different dependency resolution than online mode. Cargo
           will restrict itself to crates that are downloaded locally, even if there might be a
           newer version as indicated in the local copy of the index. See the cargo-fetch(1)
           command to download dependencies before going offline.

           May also be specified with the net.offline config value
           <https://doc.rust-lang.org/cargo/reference/config.html>.
@Shnatsel Shnatsel added bug Something isn't working fixed by upstreaming Will no longer be a problem if `auditable` is upstreamed into Cargo labels Nov 12, 2022
@Shnatsel
Copy link
Member Author

Passing the CARGO_NET_OFFLINE environment variable and setting configuration in the Cargo config file are available as workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed by upstreaming Will no longer be a problem if `auditable` is upstreamed into Cargo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant