Skip to content

Commit 1c983d9

Browse files
committed
[cargo-nextest] remove -C option
This was marked unstable in rust-lang/cargo#11960.
1 parent 162e2ff commit 1c983d9

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

cargo-nextest/src/dispatch.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
ExpectedError, Result, ReuseBuildKind,
99
};
1010
use camino::{Utf8Path, Utf8PathBuf};
11-
use clap::{ArgAction, Args, Parser, Subcommand, ValueEnum, ValueHint};
11+
use clap::{ArgAction, Args, Parser, Subcommand, ValueEnum};
1212
use guppy::graph::PackageGraph;
1313
use itertools::Itertools;
1414
use nextest_filtering::FilteringExpr;
@@ -85,10 +85,6 @@ struct AppOpts {
8585
#[arg(long, global = true, value_name = "PATH")]
8686
manifest_path: Option<Utf8PathBuf>,
8787

88-
/// Change to DIRECTORY before doing anything
89-
#[arg(short = 'C', global = true, value_name = "DIRECTORY", value_hint = ValueHint::DirPath)]
90-
directory: Option<Utf8PathBuf>,
91-
9288
#[clap(flatten)]
9389
output: OutputOpts,
9490

@@ -112,11 +108,6 @@ impl AppOpts {
112108
/// Returns the exit code.
113109
fn exec(self, output_writer: &mut OutputWriter) -> Result<i32> {
114110
let output = self.output.init();
115-
// Change immediately to the directory if specified.
116-
if let Some(directory) = &self.directory {
117-
std::env::set_current_dir(directory)
118-
.map_err(|error| ExpectedError::SetCurrentDirFailed { error })?;
119-
}
120111

121112
match self.command {
122113
Command::List {
@@ -1597,7 +1588,6 @@ mod tests {
15971588
// ---
15981589
// Commands with arguments
15991590
// ---
1600-
"cargo nextest list -C /tmp",
16011591
"cargo nextest list --list-type binaries-only",
16021592
"cargo nextest list --list-type full",
16031593
"cargo nextest list --message-format json-pretty",

site/src/CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ policy](book/stability.md) for how versioning works with cargo-nextest.
55

66
## Unreleased
77

8-
### Added
9-
10-
- A new global option `-C` allows changing to a new directory before doing anything. This was added to Rust 1.69 but is available with nextest for all Rust versions.
11-
128
## [0.9.51] - 2023-03-19
139

1410
### Changed

0 commit comments

Comments
 (0)