diff --git a/src/bin/cargo/commands/add.rs b/src/bin/cargo/commands/add.rs index 30956b00479..da821f328bd 100644 --- a/src/bin/cargo/commands/add.rs +++ b/src/bin/cargo/commands/add.rs @@ -87,6 +87,7 @@ Example uses: - Depend on crates with the same name from different registries"), ]) .arg_manifest_path_without_unsupported_path_tip() + .arg_lockfile_path() .arg_package("Package to modify") .arg_ignore_rust_version() .arg_dry_run("Don't actually write the manifest") diff --git a/src/bin/cargo/commands/bench.rs b/src/bin/cargo/commands/bench.rs index c79d7cb350d..1f4c8df80ea 100644 --- a/src/bin/cargo/commands/bench.rs +++ b/src/bin/cargo/commands/bench.rs @@ -50,6 +50,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help bench` for more detailed information.\n" diff --git a/src/bin/cargo/commands/build.rs b/src/bin/cargo/commands/build.rs index 26f7af31609..86d477ccac2 100644 --- a/src/bin/cargo/commands/build.rs +++ b/src/bin/cargo/commands/build.rs @@ -39,6 +39,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help build` for more detailed information.\n" diff --git a/src/bin/cargo/commands/check.rs b/src/bin/cargo/commands/check.rs index 56f274effba..66f378c3e90 100644 --- a/src/bin/cargo/commands/check.rs +++ b/src/bin/cargo/commands/check.rs @@ -36,6 +36,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help check` for more detailed information.\n" diff --git a/src/bin/cargo/commands/clean.rs b/src/bin/cargo/commands/clean.rs index 1764c0bca1c..d9414b4d17d 100644 --- a/src/bin/cargo/commands/clean.rs +++ b/src/bin/cargo/commands/clean.rs @@ -19,6 +19,7 @@ pub fn cli() -> Command { .arg_target_triple("Target triple to clean output for") .arg_target_dir() .arg_manifest_path() + .arg_lockfile_path() .arg_dry_run("Display what would be deleted without deleting anything") .args_conflicts_with_subcommands(true) .subcommand( diff --git a/src/bin/cargo/commands/doc.rs b/src/bin/cargo/commands/doc.rs index 2603b3cb777..6707364d946 100644 --- a/src/bin/cargo/commands/doc.rs +++ b/src/bin/cargo/commands/doc.rs @@ -39,6 +39,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help doc` for more detailed information.\n" diff --git a/src/bin/cargo/commands/fetch.rs b/src/bin/cargo/commands/fetch.rs index f60ed61b854..2fdba80baf8 100644 --- a/src/bin/cargo/commands/fetch.rs +++ b/src/bin/cargo/commands/fetch.rs @@ -9,6 +9,7 @@ pub fn cli() -> Command { .arg_silent_suggestion() .arg_target_triple("Fetch dependencies for the target triple") .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help fetch` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/fix.rs b/src/bin/cargo/commands/fix.rs index 8190cf07e95..e44980d1330 100644 --- a/src/bin/cargo/commands/fix.rs +++ b/src/bin/cargo/commands/fix.rs @@ -1,6 +1,6 @@ use crate::command_prelude::*; - use cargo::core::Workspace; + use cargo::ops; pub fn cli() -> Command { @@ -54,6 +54,7 @@ pub fn cli() -> Command { .arg_target_dir() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help fix` for more detailed information.\n" @@ -71,8 +72,13 @@ pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult { // Unlike other commands default `cargo fix` to all targets to fix as much // code as we can. let root_manifest = args.root_manifest(gctx)?; + + // Can't use workspace() to avoid using -Zavoid-dev-deps (if passed) let mut ws = Workspace::new(&root_manifest, gctx)?; ws.set_resolve_honors_rust_version(args.honor_rust_version()); + let lockfile_path = args.lockfile_path(gctx)?; + ws.set_requested_lockfile_path(lockfile_path.clone()); + let mut opts = args.compile_options(gctx, mode, Some(&ws), ProfileChecking::LegacyTestOnly)?; if !opts.filter.is_specific() { @@ -92,6 +98,7 @@ pub fn exec(gctx: &mut GlobalContext, args: &ArgMatches) -> CliResult { allow_no_vcs: args.flag("allow-no-vcs"), allow_staged: args.flag("allow-staged"), broken_code: args.flag("broken-code"), + requested_lockfile_path: lockfile_path, }, )?; Ok(()) diff --git a/src/bin/cargo/commands/generate_lockfile.rs b/src/bin/cargo/commands/generate_lockfile.rs index a2ddac61dd9..3ad858daaa7 100644 --- a/src/bin/cargo/commands/generate_lockfile.rs +++ b/src/bin/cargo/commands/generate_lockfile.rs @@ -7,6 +7,7 @@ pub fn cli() -> Command { .about("Generate the lockfile for a package") .arg_silent_suggestion() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version_with_help( "Ignore `rust-version` specification in packages (unstable)", ) diff --git a/src/bin/cargo/commands/metadata.rs b/src/bin/cargo/commands/metadata.rs index 83232ef47f2..0b98d50a114 100644 --- a/src/bin/cargo/commands/metadata.rs +++ b/src/bin/cargo/commands/metadata.rs @@ -1,6 +1,7 @@ -use crate::command_prelude::*; use cargo::ops::{self, OutputMetadataOptions}; +use crate::command_prelude::*; + pub fn cli() -> Command { subcommand("metadata") .about( @@ -26,6 +27,7 @@ pub fn cli() -> Command { .arg_silent_suggestion() .arg_features() .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help metadata` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/package.rs b/src/bin/cargo/commands/package.rs index 42b3ac3d03d..251fa286ec5 100644 --- a/src/bin/cargo/commands/package.rs +++ b/src/bin/cargo/commands/package.rs @@ -37,6 +37,7 @@ pub fn cli() -> Command { .arg_target_dir() .arg_parallel() .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help package` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/pkgid.rs b/src/bin/cargo/commands/pkgid.rs index 72abbfc0788..5fcf85b8fd9 100644 --- a/src/bin/cargo/commands/pkgid.rs +++ b/src/bin/cargo/commands/pkgid.rs @@ -10,6 +10,7 @@ pub fn cli() -> Command { .arg_silent_suggestion() .arg_package("Argument to get the package ID specifier for") .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help pkgid` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/publish.rs b/src/bin/cargo/commands/publish.rs index 3b497e1ed12..df1c4654ffe 100644 --- a/src/bin/cargo/commands/publish.rs +++ b/src/bin/cargo/commands/publish.rs @@ -24,6 +24,7 @@ pub fn cli() -> Command { .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help publish` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/remove.rs b/src/bin/cargo/commands/remove.rs index b5695e59937..e74f53d6442 100644 --- a/src/bin/cargo/commands/remove.rs +++ b/src/bin/cargo/commands/remove.rs @@ -51,6 +51,7 @@ pub fn cli() -> clap::Command { ]) .arg_package("Package to remove from") .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help remove` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/run.rs b/src/bin/cargo/commands/run.rs index 74eb1450bd0..c9e59770a28 100644 --- a/src/bin/cargo/commands/run.rs +++ b/src/bin/cargo/commands/run.rs @@ -38,6 +38,7 @@ pub fn cli() -> Command { .arg_target_triple("Build for the target triple") .arg_target_dir() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .arg_unit_graph() .arg_timings() diff --git a/src/bin/cargo/commands/rustc.rs b/src/bin/cargo/commands/rustc.rs index 2f52c6b5926..999f8d64c39 100644 --- a/src/bin/cargo/commands/rustc.rs +++ b/src/bin/cargo/commands/rustc.rs @@ -52,6 +52,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help rustc` for more detailed information.\n" diff --git a/src/bin/cargo/commands/rustdoc.rs b/src/bin/cargo/commands/rustdoc.rs index 6535ca405c6..f9c290bf5a0 100644 --- a/src/bin/cargo/commands/rustdoc.rs +++ b/src/bin/cargo/commands/rustdoc.rs @@ -45,6 +45,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help rustdoc` for more detailed information.\n" diff --git a/src/bin/cargo/commands/test.rs b/src/bin/cargo/commands/test.rs index c2657a78f05..73c3505100c 100644 --- a/src/bin/cargo/commands/test.rs +++ b/src/bin/cargo/commands/test.rs @@ -60,6 +60,7 @@ pub fn cli() -> Command { .arg_unit_graph() .arg_timings() .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version() .after_help(color_print::cstr!( "Run `cargo help test` for more detailed information.\n\ diff --git a/src/bin/cargo/commands/tree.rs b/src/bin/cargo/commands/tree.rs index 6d83f8e8e95..b0f35370ebc 100644 --- a/src/bin/cargo/commands/tree.rs +++ b/src/bin/cargo/commands/tree.rs @@ -95,6 +95,7 @@ pub fn cli() -> Command { Pass `all` to include all targets.", ) .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help tree` for more detailed information.\n" )) diff --git a/src/bin/cargo/commands/update.rs b/src/bin/cargo/commands/update.rs index 492be07c783..4c19bcb270d 100644 --- a/src/bin/cargo/commands/update.rs +++ b/src/bin/cargo/commands/update.rs @@ -49,6 +49,7 @@ pub fn cli() -> Command { .help_heading(heading::PACKAGE_SELECTION), ) .arg_manifest_path() + .arg_lockfile_path() .arg_ignore_rust_version_with_help( "Ignore `rust-version` specification in packages (unstable)", ) diff --git a/src/bin/cargo/commands/vendor.rs b/src/bin/cargo/commands/vendor.rs index efa1f1bb7b6..96b30676732 100644 --- a/src/bin/cargo/commands/vendor.rs +++ b/src/bin/cargo/commands/vendor.rs @@ -37,6 +37,7 @@ pub fn cli() -> Command { .arg(unsupported("only-git-deps")) .arg(unsupported("disallow-duplicates")) .arg_manifest_path() + .arg_lockfile_path() .after_help(color_print::cstr!( "Run `cargo help vendor` for more detailed information.\n" )) diff --git a/src/cargo/core/workspace.rs b/src/cargo/core/workspace.rs index 4ac8777bd62..6f1770b0f72 100644 --- a/src/cargo/core/workspace.rs +++ b/src/cargo/core/workspace.rs @@ -103,6 +103,9 @@ pub struct Workspace<'gctx> { // file. This is set for `cargo install` without `--locked`. ignore_lock: bool, + /// Requested path of the lockfile (i.e. passed as the cli flag) + requested_lockfile_path: Option, + /// The resolver behavior specified with the `resolver` field. resolve_behavior: ResolveBehavior, resolve_honors_rust_version: bool, @@ -237,6 +240,7 @@ impl<'gctx> Workspace<'gctx> { require_optional_deps: true, loaded_packages: RefCell::new(HashMap::new()), ignore_lock: false, + requested_lockfile_path: None, resolve_behavior: ResolveBehavior::V1, resolve_honors_rust_version: false, custom_metadata: None, @@ -647,6 +651,31 @@ impl<'gctx> Workspace<'gctx> { self } + /// Returns the directory where the lockfile is in. + pub fn lock_root(&self) -> Filesystem { + if let Some(requested) = self.requested_lockfile_path.as_ref() { + return Filesystem::new( + requested + .parent() + .expect("Lockfile path can't be root") + .to_owned(), + ); + } + self.default_lock_root() + } + + fn default_lock_root(&self) -> Filesystem { + if self.root_maybe().is_embedded() { + self.target_dir() + } else { + Filesystem::new(self.root().to_owned()) + } + } + + pub fn set_requested_lockfile_path(&mut self, path: Option) { + self.requested_lockfile_path = path; + } + /// Get the lowest-common denominator `package.rust-version` within the workspace, if specified /// anywhere pub fn rust_version(&self) -> Option<&RustVersion> { diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index 459e780f32f..f879f764101 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -6,6 +6,7 @@ use std::path::{Path, PathBuf}; use std::sync::Arc; use std::task::Poll; +use super::RegistryOrIndex; use crate::core::compiler::{BuildConfig, CompileMode, DefaultExecutor, Executor}; use crate::core::dependency::DepKind; use crate::core::manifest::Target; @@ -13,6 +14,7 @@ use crate::core::resolver::CliFeatures; use crate::core::resolver::HasDevUnits; use crate::core::{Feature, PackageIdSpecQuery, Shell, Verbosity, Workspace}; use crate::core::{Package, PackageId, PackageSet, Resolve, SourceId}; +use crate::ops::lockfile::LOCKFILE_NAME; use crate::sources::registry::index::{IndexPackage, RegistryDependency}; use crate::sources::{PathSource, SourceConfigMap, CRATES_IO_REGISTRY}; use crate::util::cache_lock::CacheLockMode; @@ -32,8 +34,6 @@ use tar::{Archive, Builder, EntryType, Header, HeaderMode}; use tracing::debug; use unicase::Ascii as UncasedAscii; -use super::RegistryOrIndex; - #[derive(Clone)] pub struct PackageOpts<'gctx> { pub gctx: &'gctx GlobalContext, @@ -248,7 +248,12 @@ pub fn package(ws: &Workspace<'_>, opts: &PackageOpts<'_>) -> CargoResult, } pub fn fix( @@ -121,6 +122,7 @@ pub fn fix( } let mut ws = Workspace::new(&root_manifest, gctx)?; ws.set_resolve_honors_rust_version(Some(original_ws.resolve_honors_rust_version())); + ws.set_requested_lockfile_path(opts.requested_lockfile_path.clone()); // Spin up our lock server, which our subprocesses will use to synchronize fixes. let lock_server = LockServer::new()?; diff --git a/src/cargo/ops/lockfile.rs b/src/cargo/ops/lockfile.rs index 162cb6031bd..d865a7186f6 100644 --- a/src/cargo/ops/lockfile.rs +++ b/src/cargo/ops/lockfile.rs @@ -6,14 +6,16 @@ use crate::util::Filesystem; use anyhow::Context as _; +pub const LOCKFILE_NAME: &str = "Cargo.lock"; + #[tracing::instrument(skip_all)] pub fn load_pkg_lockfile(ws: &Workspace<'_>) -> CargoResult> { - let lock_root = lock_root(ws); - if !lock_root.as_path_unlocked().join("Cargo.lock").exists() { + let lock_root = ws.lock_root(); + if !lock_root.as_path_unlocked().join(LOCKFILE_NAME).exists() { return Ok(None); } - let mut f = lock_root.open_ro_shared("Cargo.lock", ws.gctx(), "Cargo.lock file")?; + let mut f = lock_root.open_ro_shared(LOCKFILE_NAME, ws.gctx(), "Cargo.lock file")?; let mut s = String::new(); f.read_to_string(&mut s) @@ -58,7 +60,7 @@ pub fn write_pkg_lockfile(ws: &Workspace<'_>, resolve: &mut Resolve) -> CargoRes "the lock file {} needs to be updated but {} was passed to prevent this\n\ If you want to try to generate the lock file without accessing the network, \ remove the {} flag and use --offline instead.", - lock_root.as_path_unlocked().join("Cargo.lock").display(), + lock_root.as_path_unlocked().join(LOCKFILE_NAME).display(), flag, flag ); @@ -82,9 +84,13 @@ pub fn write_pkg_lockfile(ws: &Workspace<'_>, resolve: &mut Resolve) -> CargoRes anyhow::bail!("lock file version `{current_version:?}` requires `-Znext-lockfile-bump`") } + if !lock_root.as_path_unlocked().exists() { + lock_root.create_dir()?; + } + // Ok, if that didn't work just write it out lock_root - .open_rw_exclusive_create("Cargo.lock", ws.gctx(), "Cargo.lock file") + .open_rw_exclusive_create(LOCKFILE_NAME, ws.gctx(), "Cargo.lock file") .and_then(|mut f| { f.file().set_len(0)?; f.write_all(out.as_bytes())?; @@ -93,7 +99,7 @@ pub fn write_pkg_lockfile(ws: &Workspace<'_>, resolve: &mut Resolve) -> CargoRes .with_context(|| { format!( "failed to write {}", - lock_root.as_path_unlocked().join("Cargo.lock").display() + lock_root.as_path_unlocked().join(LOCKFILE_NAME).display() ) })?; Ok(true) @@ -104,8 +110,8 @@ fn resolve_to_string_orig( resolve: &Resolve, ) -> (Option, String, Filesystem) { // Load the original lock file if it exists. - let lock_root = lock_root(ws); - let orig = lock_root.open_ro_shared("Cargo.lock", ws.gctx(), "Cargo.lock file"); + let lock_root = ws.lock_root(); + let orig = lock_root.open_ro_shared(LOCKFILE_NAME, ws.gctx(), "Cargo.lock file"); let orig = orig.and_then(|mut f| { let mut s = String::new(); f.read_to_string(&mut s)?; @@ -245,11 +251,3 @@ fn emit_package(dep: &toml::Table, out: &mut String) { out.push_str(&format!("replace = {}\n\n", &dep["replace"])); } } - -fn lock_root(ws: &Workspace<'_>) -> Filesystem { - if ws.root_maybe().is_embedded() { - ws.target_dir() - } else { - Filesystem::new(ws.root().to_owned()) - } -} diff --git a/src/cargo/util/command_prelude.rs b/src/cargo/util/command_prelude.rs index 96fe3e8f106..dfc4ad147a0 100644 --- a/src/cargo/util/command_prelude.rs +++ b/src/cargo/util/command_prelude.rs @@ -1,6 +1,7 @@ use crate::core::compiler::{BuildConfig, MessageFormat, TimingOutput}; use crate::core::resolver::CliFeatures; use crate::core::{Edition, Workspace}; +use crate::ops::lockfile::LOCKFILE_NAME; use crate::ops::registry::RegistryOrIndex; use crate::ops::{CompileFilter, CompileOptions, NewOptions, Packages, VersionControl}; use crate::util::important_paths::find_root_manifest_for_wd; @@ -295,6 +296,14 @@ pub trait CommandExt: Sized { ) } + fn arg_lockfile_path(self) -> Self { + self._arg( + opt("lockfile-path", "Path to Cargo.lock (unstable)") + .value_name("PATH") + .help_heading(heading::MANIFEST_OPTIONS), + ) + } + fn arg_message_format(self) -> Self { self._arg(multi_opt("message-format", "FMT", "Error format")) } @@ -517,14 +526,20 @@ pub trait ArgMatchesExt { root_manifest(self._value_of("manifest-path").map(Path::new), gctx) } + fn lockfile_path(&self, gctx: &GlobalContext) -> CargoResult> { + lockfile_path(self._value_of("lockfile-path").map(Path::new), gctx) + } + #[tracing::instrument(skip_all)] fn workspace<'a>(&self, gctx: &'a GlobalContext) -> CargoResult> { let root = self.root_manifest(gctx)?; + let lockfile_path = self.lockfile_path(gctx)?; let mut ws = Workspace::new(&root, gctx)?; ws.set_resolve_honors_rust_version(self.honor_rust_version()); if gctx.cli_unstable().avoid_dev_deps { ws.set_require_optional_deps(false); } + ws.set_requested_lockfile_path(lockfile_path); Ok(ws) } @@ -986,6 +1001,32 @@ pub fn root_manifest(manifest_path: Option<&Path>, gctx: &GlobalContext) -> Carg } } +pub fn lockfile_path( + lockfile_path: Option<&Path>, + gctx: &GlobalContext, +) -> CargoResult> { + let Some(lockfile_path) = lockfile_path else { + return Ok(None); + }; + + gctx.cli_unstable() + .fail_if_stable_opt("--lockfile-path", 5707)?; + + let path = gctx.cwd().join(lockfile_path); + + if !path.ends_with(LOCKFILE_NAME) { + bail!("the lockfile-path must be a path to a {LOCKFILE_NAME} file (please rename your lock file to {LOCKFILE_NAME})") + } + if path.is_dir() { + bail!( + "lockfile path `{}` is a directory but expected a file", + lockfile_path.display() + ) + } + + return Ok(Some(path)); +} + #[track_caller] pub fn ignore_unknown(r: Result) -> T { match r { diff --git a/src/doc/man/cargo-add.md b/src/doc/man/cargo-add.md index 6d388cb5417..1c0b736af90 100644 --- a/src/doc/man/cargo-add.md +++ b/src/doc/man/cargo-add.md @@ -160,6 +160,8 @@ Add dependencies to only the specified package. {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md index cd54fcee404..9e8ce249074 100644 --- a/src/doc/man/cargo-bench.md +++ b/src/doc/man/cargo-bench.md @@ -146,6 +146,8 @@ passing `--nocapture` to the benchmark binaries: {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-build.md b/src/doc/man/cargo-build.md index 7c704314ca4..bf4fbc34e64 100644 --- a/src/doc/man/cargo-build.md +++ b/src/doc/man/cargo-build.md @@ -87,6 +87,8 @@ See for more information. {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-check.md b/src/doc/man/cargo-check.md index 9af606fda3d..0a846c4e92f 100644 --- a/src/doc/man/cargo-check.md +++ b/src/doc/man/cargo-check.md @@ -70,6 +70,8 @@ they have `required-features` that are missing. {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-clean.md b/src/doc/man/cargo-clean.md index ee920b22369..bc8fdc2ba5d 100644 --- a/src/doc/man/cargo-clean.md +++ b/src/doc/man/cargo-clean.md @@ -72,6 +72,8 @@ Remove all artifacts in the directory with the given profile name. {{> options-manifest-path }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-doc.md b/src/doc/man/cargo-doc.md index 3d036024d42..d5431df5d60 100644 --- a/src/doc/man/cargo-doc.md +++ b/src/doc/man/cargo-doc.md @@ -104,6 +104,8 @@ and supports common Unix glob patterns. {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-fetch.md b/src/doc/man/cargo-fetch.md index b8a0eb66620..22a833f81bf 100644 --- a/src/doc/man/cargo-fetch.md +++ b/src/doc/man/cargo-fetch.md @@ -48,6 +48,8 @@ you plan to use Cargo without a network with the `--offline` flag. {{> options-manifest-path }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-fix.md b/src/doc/man/cargo-fix.md index af0dc3f214a..2c25720db48 100644 --- a/src/doc/man/cargo-fix.md +++ b/src/doc/man/cargo-fix.md @@ -150,6 +150,8 @@ When no target selection options are given, `cargo fix` will fix all targets {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-generate-lockfile.md b/src/doc/man/cargo-generate-lockfile.md index 956cc58dc20..63c17849c81 100644 --- a/src/doc/man/cargo-generate-lockfile.md +++ b/src/doc/man/cargo-generate-lockfile.md @@ -33,6 +33,8 @@ lockfile and has more options for controlling update behavior. {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-metadata.md b/src/doc/man/cargo-metadata.md index f95ba7c5eec..0205a61e865 100644 --- a/src/doc/man/cargo-metadata.md +++ b/src/doc/man/cargo-metadata.md @@ -378,6 +378,8 @@ reproduction of the information within `Cargo.toml`. {{> options-manifest-path }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-package.md b/src/doc/man/cargo-package.md index 7443c20fd0c..3d2fd1fbb6d 100644 --- a/src/doc/man/cargo-package.md +++ b/src/doc/man/cargo-package.md @@ -128,6 +128,8 @@ published to this registry. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} ### Miscellaneous Options diff --git a/src/doc/man/cargo-pkgid.md b/src/doc/man/cargo-pkgid.md index 54cb9f3912b..28a6ea13808 100644 --- a/src/doc/man/cargo-pkgid.md +++ b/src/doc/man/cargo-pkgid.md @@ -63,6 +63,8 @@ Get the package ID for the given package instead of the current package. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-publish.md b/src/doc/man/cargo-publish.md index c5e64db80de..fa4c823ea09 100644 --- a/src/doc/man/cargo-publish.md +++ b/src/doc/man/cargo-publish.md @@ -90,6 +90,8 @@ which defaults to `crates-io`. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} ### Miscellaneous Options diff --git a/src/doc/man/cargo-remove.md b/src/doc/man/cargo-remove.md index 0bdb04ac63c..87bacb5b491 100644 --- a/src/doc/man/cargo-remove.md +++ b/src/doc/man/cargo-remove.md @@ -59,6 +59,8 @@ Don't actually write to the manifest. {{> options-manifest-path }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} ### Package Selection diff --git a/src/doc/man/cargo-run.md b/src/doc/man/cargo-run.md index d32236c1efe..c5d37790e5d 100644 --- a/src/doc/man/cargo-run.md +++ b/src/doc/man/cargo-run.md @@ -87,6 +87,8 @@ Run the specified example. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-rustc.md b/src/doc/man/cargo-rustc.md index 7a3f5760834..15238ea09d3 100644 --- a/src/doc/man/cargo-rustc.md +++ b/src/doc/man/cargo-rustc.md @@ -112,6 +112,8 @@ This flag only works when building a `lib` or `example` library target. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-rustdoc.md b/src/doc/man/cargo-rustdoc.md index 393f7c8b491..5a354d2d1d6 100644 --- a/src/doc/man/cargo-rustdoc.md +++ b/src/doc/man/cargo-rustdoc.md @@ -93,6 +93,8 @@ if its name is the same as the lib target. Binaries are skipped if they have {{> options-ignore-rust-version }} {{> options-locked }} + +{{> options-lockfile-path }} {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md index fa4c998e927..93663f9cabf 100644 --- a/src/doc/man/cargo-test.md +++ b/src/doc/man/cargo-test.md @@ -172,6 +172,8 @@ results readable. Test output can be recovered (e.g., for debugging) by passing {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-tree.md b/src/doc/man/cargo-tree.md index f8773430c16..ce99b761e7d 100644 --- a/src/doc/man/cargo-tree.md +++ b/src/doc/man/cargo-tree.md @@ -186,6 +186,7 @@ Sets how each line is displayed. The _prefix_ value can be one of: {{> options-locked }} +{{> options-lockfile-path }} {{/options}} {{> section-features }} diff --git a/src/doc/man/cargo-update.md b/src/doc/man/cargo-update.md index e0ad8ff5352..8e7a9be5a76 100644 --- a/src/doc/man/cargo-update.md +++ b/src/doc/man/cargo-update.md @@ -97,6 +97,8 @@ Displays what would be updated, but doesn't actually write the lockfile. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} {{> section-options-common }} diff --git a/src/doc/man/cargo-vendor.md b/src/doc/man/cargo-vendor.md index 8f0ea952113..464437b044f 100644 --- a/src/doc/man/cargo-vendor.md +++ b/src/doc/man/cargo-vendor.md @@ -66,6 +66,8 @@ only a subset of the packages have changed. {{> options-locked }} +{{> options-lockfile-path }} + {{/options}} ### Display Options diff --git a/src/doc/man/generated_txt/cargo-add.txt b/src/doc/man/generated_txt/cargo-add.txt index b4f006b9e17..f37496d749c 100644 --- a/src/doc/man/generated_txt/cargo-add.txt +++ b/src/doc/man/generated_txt/cargo-add.txt @@ -197,6 +197,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt index ae26fae333c..ea29cb40732 100644 --- a/src/doc/man/generated_txt/cargo-bench.txt +++ b/src/doc/man/generated_txt/cargo-bench.txt @@ -368,6 +368,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt index 316c068d0b5..b405d010b87 100644 --- a/src/doc/man/generated_txt/cargo-build.txt +++ b/src/doc/man/generated_txt/cargo-build.txt @@ -302,6 +302,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt index 844f101784d..abd3b806ce4 100644 --- a/src/doc/man/generated_txt/cargo-check.txt +++ b/src/doc/man/generated_txt/cargo-check.txt @@ -287,6 +287,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-clean.txt b/src/doc/man/generated_txt/cargo-clean.txt index 066a70352a3..b8ac07fe899 100644 --- a/src/doc/man/generated_txt/cargo-clean.txt +++ b/src/doc/man/generated_txt/cargo-clean.txt @@ -123,6 +123,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt index 2f90b945852..f6dde3580f2 100644 --- a/src/doc/man/generated_txt/cargo-doc.txt +++ b/src/doc/man/generated_txt/cargo-doc.txt @@ -258,6 +258,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt index 63fa205a3c5..58611ee8d5e 100644 --- a/src/doc/man/generated_txt/cargo-fetch.txt +++ b/src/doc/man/generated_txt/cargo-fetch.txt @@ -102,6 +102,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt index c458ce5a277..13f9a181fe2 100644 --- a/src/doc/man/generated_txt/cargo-fix.txt +++ b/src/doc/man/generated_txt/cargo-fix.txt @@ -360,6 +360,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-generate-lockfile.txt b/src/doc/man/generated_txt/cargo-generate-lockfile.txt index 7c925d38475..7e251ba0afc 100644 --- a/src/doc/man/generated_txt/cargo-generate-lockfile.txt +++ b/src/doc/man/generated_txt/cargo-generate-lockfile.txt @@ -81,6 +81,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-metadata.txt b/src/doc/man/generated_txt/cargo-metadata.txt index 9785e005701..5500387c59d 100644 --- a/src/doc/man/generated_txt/cargo-metadata.txt +++ b/src/doc/man/generated_txt/cargo-metadata.txt @@ -438,6 +438,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt index 39c317c63e2..6d1020b2eac 100644 --- a/src/doc/man/generated_txt/cargo-package.txt +++ b/src/doc/man/generated_txt/cargo-package.txt @@ -212,6 +212,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Miscellaneous Options -j N, --jobs N Number of parallel jobs to run. May also be specified with the diff --git a/src/doc/man/generated_txt/cargo-pkgid.txt b/src/doc/man/generated_txt/cargo-pkgid.txt index 3123dcad20b..c4396491941 100644 --- a/src/doc/man/generated_txt/cargo-pkgid.txt +++ b/src/doc/man/generated_txt/cargo-pkgid.txt @@ -116,6 +116,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt index d0b32a1582d..a78e8a473e8 100644 --- a/src/doc/man/generated_txt/cargo-publish.txt +++ b/src/doc/man/generated_txt/cargo-publish.txt @@ -160,6 +160,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Miscellaneous Options -j N, --jobs N Number of parallel jobs to run. May also be specified with the diff --git a/src/doc/man/generated_txt/cargo-remove.txt b/src/doc/man/generated_txt/cargo-remove.txt index 9d8c14afcc9..7a0dac18dcd 100644 --- a/src/doc/man/generated_txt/cargo-remove.txt +++ b/src/doc/man/generated_txt/cargo-remove.txt @@ -93,6 +93,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Package Selection -p spec…, --package spec… Package to remove from. diff --git a/src/doc/man/generated_txt/cargo-run.txt b/src/doc/man/generated_txt/cargo-run.txt index 6cea9d3a661..b39116489a1 100644 --- a/src/doc/man/generated_txt/cargo-run.txt +++ b/src/doc/man/generated_txt/cargo-run.txt @@ -206,6 +206,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt index 86ef3114013..d608d54f827 100644 --- a/src/doc/man/generated_txt/cargo-rustc.txt +++ b/src/doc/man/generated_txt/cargo-rustc.txt @@ -304,6 +304,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt index f93a59c79e9..5ce2de988ba 100644 --- a/src/doc/man/generated_txt/cargo-rustdoc.txt +++ b/src/doc/man/generated_txt/cargo-rustdoc.txt @@ -274,6 +274,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt index 1b97d3d7dff..b14b754b985 100644 --- a/src/doc/man/generated_txt/cargo-test.txt +++ b/src/doc/man/generated_txt/cargo-test.txt @@ -394,6 +394,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-tree.txt b/src/doc/man/generated_txt/cargo-tree.txt index 4037e7f0c5c..f78c9ce8e69 100644 --- a/src/doc/man/generated_txt/cargo-tree.txt +++ b/src/doc/man/generated_txt/cargo-tree.txt @@ -243,6 +243,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Feature Selection The feature flags allow you to control which features are enabled. When no feature options are given, the default feature is activated for every diff --git a/src/doc/man/generated_txt/cargo-update.txt b/src/doc/man/generated_txt/cargo-update.txt index 1e3500481ad..95293b1ae39 100644 --- a/src/doc/man/generated_txt/cargo-update.txt +++ b/src/doc/man/generated_txt/cargo-update.txt @@ -140,6 +140,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Common Options +toolchain If Cargo has been installed with rustup, and the first argument to diff --git a/src/doc/man/generated_txt/cargo-vendor.txt b/src/doc/man/generated_txt/cargo-vendor.txt index 771e75326d6..e43b02fa1a0 100644 --- a/src/doc/man/generated_txt/cargo-vendor.txt +++ b/src/doc/man/generated_txt/cargo-vendor.txt @@ -85,6 +85,21 @@ OPTIONS --frozen Equivalent to specifying both --locked and --offline. + --lockfile-path PATH + Changes the path of the lockfile from the default + (/Cargo.lock) to PATH. PATH must end with Cargo.lock + (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that + providing --lockfile-path will ignore existing lockfile at the + default path, and instead will either use the lockfile from PATH, or + write a new lockfile into the provided PATH if it doesn’t exist. + This flag can be used to run most commands in read-only directories, + writing lockfile into the provided PATH. + + This option is only available on the nightly channel + and + requires the -Z unstable-options flag to enable (see #5707 + ). + Display Options -v, --verbose Use verbose output. May be specified twice for “very verbose” diff --git a/src/doc/man/includes/options-lockfile-path.md b/src/doc/man/includes/options-lockfile-path.md new file mode 100644 index 00000000000..993b9884ec8 --- /dev/null +++ b/src/doc/man/includes/options-lockfile-path.md @@ -0,0 +1,12 @@ +{{#option "`--lockfile-path` _PATH_"}} +Changes the path of the lockfile from the default (`/Cargo.lock`) to _PATH_. _PATH_ must end with +`Cargo.lock` (e.g. `--lockfile-path /tmp/temporary-lockfile/Cargo.lock`). Note that providing +`--lockfile-path` will ignore existing lockfile at the default path, and instead will +either use the lockfile from _PATH_, or write a new lockfile into the provided _PATH_ if it doesn't exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided _PATH_. + +This option is only available on the [nightly +channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) and +requires the `-Z unstable-options` flag to enable (see +[#5707](https://github.com/rust-lang/cargo/issues/5707)). +{{/option}} \ No newline at end of file diff --git a/src/doc/src/commands/cargo-add.md b/src/doc/src/commands/cargo-add.md index 0411bdd5c30..443db3a8b33 100644 --- a/src/doc/src/commands/cargo-add.md +++ b/src/doc/src/commands/cargo-add.md @@ -215,6 +215,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md index d48e164e956..b23127fb98a 100644 --- a/src/doc/src/commands/cargo-bench.md +++ b/src/doc/src/commands/cargo-bench.md @@ -404,6 +404,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md index d0be79bbd0f..a8fe5f58623 100644 --- a/src/doc/src/commands/cargo-build.md +++ b/src/doc/src/commands/cargo-build.md @@ -335,6 +335,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md index 2db53d9dcd4..41fa6b73131 100644 --- a/src/doc/src/commands/cargo-check.md +++ b/src/doc/src/commands/cargo-check.md @@ -317,6 +317,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-clean.md b/src/doc/src/commands/cargo-clean.md index aa4e0eb46e3..72ae58c9577 100644 --- a/src/doc/src/commands/cargo-clean.md +++ b/src/doc/src/commands/cargo-clean.md @@ -138,6 +138,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md index a57389e8a2b..041c171975b 100644 --- a/src/doc/src/commands/cargo-doc.md +++ b/src/doc/src/commands/cargo-doc.md @@ -292,6 +292,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md index 694a4a2f0ca..782fdab355a 100644 --- a/src/doc/src/commands/cargo-fetch.md +++ b/src/doc/src/commands/cargo-fetch.md @@ -105,6 +105,18 @@ if there might be a newer version as indicated in the local copy of the index.--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md index 6e3faa01b29..8937692393b 100644 --- a/src/doc/src/commands/cargo-fix.md +++ b/src/doc/src/commands/cargo-fix.md @@ -397,6 +397,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-generate-lockfile.md b/src/doc/src/commands/cargo-generate-lockfile.md index a87e86a6295..a361cabf02b 100644 --- a/src/doc/src/commands/cargo-generate-lockfile.md +++ b/src/doc/src/commands/cargo-generate-lockfile.md @@ -90,6 +90,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-metadata.md b/src/doc/src/commands/cargo-metadata.md index 3326c44a1ef..4d09d6c3df1 100644 --- a/src/doc/src/commands/cargo-metadata.md +++ b/src/doc/src/commands/cargo-metadata.md @@ -458,6 +458,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md index 765281f479c..c8a13f8eb23 100644 --- a/src/doc/src/commands/cargo-package.md +++ b/src/doc/src/commands/cargo-package.md @@ -233,6 +233,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Miscellaneous Options diff --git a/src/doc/src/commands/cargo-pkgid.md b/src/doc/src/commands/cargo-pkgid.md index e392985f1f5..c531864d3b9 100644 --- a/src/doc/src/commands/cargo-pkgid.md +++ b/src/doc/src/commands/cargo-pkgid.md @@ -119,6 +119,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Common Options diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md index 17d917b7ca5..dacdfc8fd26 100644 --- a/src/doc/src/commands/cargo-publish.md +++ b/src/doc/src/commands/cargo-publish.md @@ -180,6 +180,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Miscellaneous Options diff --git a/src/doc/src/commands/cargo-remove.md b/src/doc/src/commands/cargo-remove.md index afbcbf590eb..95e827b7c41 100644 --- a/src/doc/src/commands/cargo-remove.md +++ b/src/doc/src/commands/cargo-remove.md @@ -109,6 +109,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Package Selection diff --git a/src/doc/src/commands/cargo-run.md b/src/doc/src/commands/cargo-run.md index 4ea9ef2f8af..408008106e4 100644 --- a/src/doc/src/commands/cargo-run.md +++ b/src/doc/src/commands/cargo-run.md @@ -238,6 +238,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Common Options diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md index 08d2479e3da..494cb3ccd34 100644 --- a/src/doc/src/commands/cargo-rustc.md +++ b/src/doc/src/commands/cargo-rustc.md @@ -332,6 +332,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Common Options diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md index f6c2ac4ce3c..cd6ec47a8a5 100644 --- a/src/doc/src/commands/cargo-rustdoc.md +++ b/src/doc/src/commands/cargo-rustdoc.md @@ -312,6 +312,18 @@ offline.

--frozen
Equivalent to specifying both --locked and --offline.
+ +
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Common Options diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md index 0ea9255f9ce..3e3304948b3 100644 --- a/src/doc/src/commands/cargo-test.md +++ b/src/doc/src/commands/cargo-test.md @@ -434,6 +434,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Common Options diff --git a/src/doc/src/commands/cargo-tree.md b/src/doc/src/commands/cargo-tree.md index a596a9b9882..4c1ae3d646a 100644 --- a/src/doc/src/commands/cargo-tree.md +++ b/src/doc/src/commands/cargo-tree.md @@ -251,6 +251,17 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ ### Feature Selection diff --git a/src/doc/src/commands/cargo-update.md b/src/doc/src/commands/cargo-update.md index 3c7eb59e7f1..54d17a3df2b 100644 --- a/src/doc/src/commands/cargo-update.md +++ b/src/doc/src/commands/cargo-update.md @@ -150,6 +150,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Common Options diff --git a/src/doc/src/commands/cargo-vendor.md b/src/doc/src/commands/cargo-vendor.md index 587da266ee1..3ec1ffeef0b 100644 --- a/src/doc/src/commands/cargo-vendor.md +++ b/src/doc/src/commands/cargo-vendor.md @@ -97,6 +97,18 @@ offline.

Equivalent to specifying both --locked and --offline.
+
--lockfile-path PATH
+
Changes the path of the lockfile from the default (<workspace_root>/Cargo.lock) to PATH. PATH must end with +Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock). Note that providing +--lockfile-path will ignore existing lockfile at the default path, and instead will +either use the lockfile from PATH, or write a new lockfile into the provided PATH if it doesn’t exist. +This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH.

+

This option is only available on the nightly +channel and +requires the -Z unstable-options flag to enable (see +#5707).

+ + ### Display Options diff --git a/src/etc/man/cargo-add.1 b/src/etc/man/cargo-add.1 index ed8859da37f..d5db51f1547 100644 --- a/src/etc/man/cargo-add.1 +++ b/src/etc/man/cargo-add.1 @@ -254,6 +254,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1 index a9c3ba00387..df71be5174f 100644 --- a/src/etc/man/cargo-bench.1 +++ b/src/etc/man/cargo-bench.1 @@ -454,6 +454,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1 index 23e49a15e16..0eaa6085a71 100644 --- a/src/etc/man/cargo-build.1 +++ b/src/etc/man/cargo-build.1 @@ -372,6 +372,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1 index 50dd9e37f09..9d595bac4ce 100644 --- a/src/etc/man/cargo-check.1 +++ b/src/etc/man/cargo-check.1 @@ -353,6 +353,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1 index 00f47ad91f5..63fa9a4ecc2 100644 --- a/src/etc/man/cargo-clean.1 +++ b/src/etc/man/cargo-clean.1 @@ -153,6 +153,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1 index 789a736f27b..89bc9f661b7 100644 --- a/src/etc/man/cargo-doc.1 +++ b/src/etc/man/cargo-doc.1 @@ -320,6 +320,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1 index 6687506f46a..403b2195db4 100644 --- a/src/etc/man/cargo-fetch.1 +++ b/src/etc/man/cargo-fetch.1 @@ -119,6 +119,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1 index 0b94291bb3e..61ac3186343 100644 --- a/src/etc/man/cargo-fix.1 +++ b/src/etc/man/cargo-fix.1 @@ -448,6 +448,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-generate-lockfile.1 b/src/etc/man/cargo-generate-lockfile.1 index 732c805a73d..3a9f2bdf1a2 100644 --- a/src/etc/man/cargo-generate-lockfile.1 +++ b/src/etc/man/cargo-generate-lockfile.1 @@ -105,6 +105,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-metadata.1 b/src/etc/man/cargo-metadata.1 index 1357ad1f5d1..e2269935d59 100644 --- a/src/etc/man/cargo-metadata.1 +++ b/src/etc/man/cargo-metadata.1 @@ -476,6 +476,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1 index 8530e5454ca..1ac506c08fa 100644 --- a/src/etc/man/cargo-package.1 +++ b/src/etc/man/cargo-package.1 @@ -260,6 +260,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Miscellaneous Options" .sp \fB\-j\fR \fIN\fR, diff --git a/src/etc/man/cargo-pkgid.1 b/src/etc/man/cargo-pkgid.1 index f8b7724bd58..6d6da78e35d 100644 --- a/src/etc/man/cargo-pkgid.1 +++ b/src/etc/man/cargo-pkgid.1 @@ -159,6 +159,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1 index 8a65416f7dd..0fd1c9e864e 100644 --- a/src/etc/man/cargo-publish.1 +++ b/src/etc/man/cargo-publish.1 @@ -192,6 +192,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Miscellaneous Options" .sp \fB\-j\fR \fIN\fR, diff --git a/src/etc/man/cargo-remove.1 b/src/etc/man/cargo-remove.1 index 12f1dcfe808..1b90e2abb2d 100644 --- a/src/etc/man/cargo-remove.1 +++ b/src/etc/man/cargo-remove.1 @@ -119,6 +119,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Package Selection" .sp \fB\-p\fR \fIspec\fR\[u2026], diff --git a/src/etc/man/cargo-run.1 b/src/etc/man/cargo-run.1 index 654322fb971..3794fe15928 100644 --- a/src/etc/man/cargo-run.1 +++ b/src/etc/man/cargo-run.1 @@ -257,6 +257,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1 index cd07c6a32d9..f5f18568375 100644 --- a/src/etc/man/cargo-rustc.1 +++ b/src/etc/man/cargo-rustc.1 @@ -371,6 +371,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1 index f89a6f7de82..b6393f8bb24 100644 --- a/src/etc/man/cargo-rustdoc.1 +++ b/src/etc/man/cargo-rustdoc.1 @@ -339,6 +339,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1 index 84b7ef1927e..945d90fb29b 100644 --- a/src/etc/man/cargo-test.1 +++ b/src/etc/man/cargo-test.1 @@ -481,6 +481,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-tree.1 b/src/etc/man/cargo-tree.1 index 9c08491c8b9..365ad15eb59 100644 --- a/src/etc/man/cargo-tree.1 +++ b/src/etc/man/cargo-tree.1 @@ -304,6 +304,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Feature Selection" The feature flags allow you to control which features are enabled. When no feature options are given, the \fBdefault\fR feature is activated for every diff --git a/src/etc/man/cargo-update.1 b/src/etc/man/cargo-update.1 index c682e05fc40..cf20758fc20 100644 --- a/src/etc/man/cargo-update.1 +++ b/src/etc/man/cargo-update.1 @@ -181,6 +181,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Common Options" .sp \fB+\fR\fItoolchain\fR diff --git a/src/etc/man/cargo-vendor.1 b/src/etc/man/cargo-vendor.1 index eae728deaf7..af7369f13d7 100644 --- a/src/etc/man/cargo-vendor.1 +++ b/src/etc/man/cargo-vendor.1 @@ -100,6 +100,20 @@ May also be specified with the \fBnet.offline\fR \fIconfig value\fR /Cargo.lock\fR) to \fIPATH\fR\&. \fIPATH\fR must end with +\fBCargo.lock\fR (e.g. \fB\-\-lockfile\-path /tmp/temporary\-lockfile/Cargo.lock\fR). Note that providing +\fB\-\-lockfile\-path\fR will ignore existing lockfile at the default path, and instead will +either use the lockfile from \fIPATH\fR, or write a new lockfile into the provided \fIPATH\fR if it doesn\[cq]t exist. +This flag can be used to run most commands in read\-only directories, writing lockfile into the provided \fIPATH\fR\&. +.sp +This option is only available on the \fInightly +channel\fR and +requires the \fB\-Z unstable\-options\fR flag to enable (see +\fI#5707\fR ). +.RE .SS "Display Options" .sp \fB\-v\fR, diff --git a/tests/testsuite/cargo_add/help/stdout.term.svg b/tests/testsuite/cargo_add/help/stdout.term.svg index 2e1cacd322a..9335d606113 100644 --- a/tests/testsuite/cargo_add/help/stdout.term.svg +++ b/tests/testsuite/cargo_add/help/stdout.term.svg @@ -1,4 +1,4 @@ - +