Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix value parser for Option<PathBuf> #1307

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use self::publish::{access::Access, publish};
use self::test::{Test, TestOptions};
use crate::install::InstallMode;
use anyhow::Result;
use clap::builder::ValueParser;
use clap::Subcommand;
use log::info;
use std::path::PathBuf;
Expand All @@ -33,7 +32,7 @@ pub enum Command {
/// 🍱 create a tar of your npm package but don't publish!
Pack {
/// The path to the Rust crate. If not set, searches up the path from the current directory.
#[clap(value_parser = ValueParser::os_string())]
#[clap()]
path: Option<PathBuf>,
},

Expand Down Expand Up @@ -70,7 +69,7 @@ pub enum Command {
tag: Option<String>,

/// The path to the Rust crate. If not set, searches up the path from the current directory.
#[clap(value_parser = ValueParser::os_string())]
#[clap()]
path: Option<PathBuf>,
},

Expand Down
7 changes: 3 additions & 4 deletions src/command/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::manifest;
use crate::test::{self, webdriver};
use anyhow::{bail, Result};
use binary_install::Cache;
use clap::builder::ValueParser;
use clap::Args;
use console::style;
use log::info;
Expand All @@ -32,7 +31,7 @@ pub struct TestOptions {
/// copy.
pub firefox: bool,

#[clap(long = "geckodriver", value_parser = ValueParser::os_string())]
#[clap(long = "geckodriver")]
/// The path to the `geckodriver` WebDriver client for testing in
/// Firefox. Implies `--firefox`.
pub geckodriver: Option<PathBuf>,
Expand All @@ -44,7 +43,7 @@ pub struct TestOptions {
/// copy.
pub chrome: bool,

#[clap(long = "chromedriver", value_parser = ValueParser::os_string())]
#[clap(long = "chromedriver")]
/// The path to the `chromedriver` WebDriver client for testing in
/// Chrome. Implies `--chrome`.
pub chromedriver: Option<PathBuf>,
Expand All @@ -56,7 +55,7 @@ pub struct TestOptions {
/// download the `safaridriver` WebDriver client for you.
pub safari: bool,

#[clap(long = "safaridriver", value_parser = ValueParser::os_string())]
#[clap(long = "safaridriver")]
/// The path to the `safaridriver` WebDriver client for testing in
/// Safari. Implies `--safari`.
pub safaridriver: Option<PathBuf>,
Expand Down