Skip to content

Commit

Permalink
Replace use and suggestion of deprecated --all (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
qm3ster authored May 26, 2020
1 parent fa0661d commit 034f6ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/bin/upgrade/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ upgrade to for each can be specified with e.g. `docopt@0.8.0` or `serde@>=0.9,<2
Dev, build, and all target dependencies will also be upgraded. Only dependencies from crates.io are
supported. Git/path dependencies will be ignored.
All packages in the workspace will be upgraded if the `--all` flag is supplied. The `--all` flag may
All packages in the workspace will be upgraded if the `--workspace` flag is supplied. The `--workspace` flag may
be supplied in the presence of a virtual manifest.
If the '--to-lockfile' flag is supplied, all dependencies will be upgraded to the currently locked
Expand Down Expand Up @@ -217,7 +217,7 @@ impl Manifests {
// package, we must have been called against a virtual manifest.
.chain_err(|| {
"Found virtual manifest, but this command requires running against an \
actual package in this workspace. Try adding `--all`."
actual package in this workspace. Try adding `--workspace`."
})?;

Ok(Manifests(vec![(manifest, package.to_owned())]))
Expand Down
2 changes: 1 addition & 1 deletion src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn manifest_from_pkgid(pkgid: &str) -> Result<Package> {
.find(|pkg| pkg.name == pkgid)
.chain_err(|| {
"Found virtual manifest, but this command requires running against an \
actual package in this workspace. Try adding `--all`."
actual package in this workspace. Try adding `--workspace`."
})?;
Ok(package)
}
8 changes: 4 additions & 4 deletions tests/cargo-upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ fn all_flag_is_deprecated() {
fn upgrade_workspace_all() {
let (_tmpdir, root_manifest, workspace_manifests) = copy_workspace_test();

execute_command(&["upgrade", "--all"], &root_manifest);
execute_command(&["upgrade", "--workspace"], &root_manifest);

// All of the workspace members have `libc` as a dependency.
for workspace_member in workspace_manifests {
Expand Down Expand Up @@ -401,7 +401,7 @@ fn detect_workspace() {
.stderr()
.is(
"Command failed due to unhandled error: Found virtual manifest, but this command \
requires running against an actual package in this workspace. Try adding `--all`.",
requires running against an actual package in this workspace. Try adding `--workspace`.",
)
.unwrap();
}
Expand Down Expand Up @@ -440,7 +440,7 @@ fn invalid_root_manifest_all() {
assert_cli::Assert::command(&[
get_command_path("upgrade").as_str(),
"upgrade",
"--all",
"--workspace",
"--manifest-path",
&manifest,
])
Expand Down Expand Up @@ -517,7 +517,7 @@ fn upgrade_to_lockfile() {
fn upgrade_workspace_to_lockfile_all() {
let (tmpdir, root_manifest, _workspace_manifests) = copy_workspace_test();

execute_command(&["upgrade", "--all", "--to-lockfile"], &root_manifest);
execute_command(&["upgrade", "--workspace", "--to-lockfile"], &root_manifest);

// The members one and two both request different, semver incompatible
// versions of rand. Test that both were upgraded correctly.
Expand Down

0 comments on commit 034f6ef

Please sign in to comment.