Skip to content

Commit

Permalink
Merge pull request #686 from epage/custom
Browse files Browse the repository at this point in the history
fix(config): Accept non-UTF8 config locations
  • Loading branch information
epage committed Jun 16, 2023
2 parents 4f66a93 + c18b391 commit c8bc39d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ pub fn load_workspace_config(

if let Some(custom_config_path) = args.custom_config.as_ref() {
// when calling with -c option
let cfg = resolve_custom_config(Path::new(custom_config_path))?.unwrap_or_default();
let cfg = resolve_custom_config(custom_config_path.as_ref())?.unwrap_or_default();
release_config.update(&cfg);
}

Expand Down Expand Up @@ -527,7 +527,7 @@ pub fn load_package_config(
pub struct ConfigArgs {
/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
pub custom_config: Option<String>,
pub custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct ChangesStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct CommitStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct HookStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct OwnerStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct PublishStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct PushStep {

/// Custom config file
#[arg(short, long = "config", value_name = "PATH")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct ReplaceStep {

/// Custom config file
#[arg(short, long = "config")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct TagStep {

/// Custom config file
#[arg(short, long = "config")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down
2 changes: 1 addition & 1 deletion src/steps/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct VersionStep {

/// Custom config file
#[arg(short, long = "config")]
custom_config: Option<String>,
custom_config: Option<std::path::PathBuf>,

/// Ignore implicit configuration files.
#[arg(long)]
Expand Down

0 comments on commit c8bc39d

Please sign in to comment.