Skip to content

Commit

Permalink
[cargo-nextest] remove -C option
Browse files Browse the repository at this point in the history
This was marked unstable in
rust-lang/cargo#11960.
  • Loading branch information
sunshowers committed May 4, 2023
1 parent 162e2ff commit 1c983d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
12 changes: 1 addition & 11 deletions cargo-nextest/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
ExpectedError, Result, ReuseBuildKind,
};
use camino::{Utf8Path, Utf8PathBuf};
use clap::{ArgAction, Args, Parser, Subcommand, ValueEnum, ValueHint};
use clap::{ArgAction, Args, Parser, Subcommand, ValueEnum};
use guppy::graph::PackageGraph;
use itertools::Itertools;
use nextest_filtering::FilteringExpr;
Expand Down Expand Up @@ -85,10 +85,6 @@ struct AppOpts {
#[arg(long, global = true, value_name = "PATH")]
manifest_path: Option<Utf8PathBuf>,

/// Change to DIRECTORY before doing anything
#[arg(short = 'C', global = true, value_name = "DIRECTORY", value_hint = ValueHint::DirPath)]
directory: Option<Utf8PathBuf>,

#[clap(flatten)]
output: OutputOpts,

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

match self.command {
Command::List {
Expand Down Expand Up @@ -1597,7 +1588,6 @@ mod tests {
// ---
// Commands with arguments
// ---
"cargo nextest list -C /tmp",
"cargo nextest list --list-type binaries-only",
"cargo nextest list --list-type full",
"cargo nextest list --message-format json-pretty",
Expand Down
4 changes: 0 additions & 4 deletions site/src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ policy](book/stability.md) for how versioning works with cargo-nextest.

## Unreleased

### Added

- 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.

## [0.9.51] - 2023-03-19

### Changed
Expand Down

0 comments on commit 1c983d9

Please sign in to comment.