Skip to content

Commit

Permalink
refactor: rename colour to color in cli
Browse files Browse the repository at this point in the history
Signed-off-by: aplio <[email protected]>
  • Loading branch information
aplio authored and nxsaken committed Jun 6, 2024
1 parent f5d8b59 commit 5f9eb90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,12 @@ fn validate_try_bind_address(emitter: &mut Emitter<ConfigError>, value: &WithOri
}

#[allow(missing_docs)]
pub fn is_colouring_supported() -> bool {
pub fn is_coloring_supported() -> bool {
supports_color::on(supports_color::Stream::Stdout).is_some()
}

fn default_terminal_colors_str() -> clap::builder::OsStr {
is_colouring_supported().to_string().into()
is_coloring_supported().to_string().into()
}

/// Iroha server CLI
Expand Down Expand Up @@ -1002,7 +1002,7 @@ mod tests {
fn default_args() {
let args = Args::try_parse_from(["test"]).unwrap();

assert_eq!(args.terminal_colors, is_colouring_supported());
assert_eq!(args.terminal_colors, is_coloring_supported());
assert_eq!(args.submit_genesis, false);
}

Expand All @@ -1015,7 +1015,7 @@ mod tests {

assert_eq!(
Args::try_parse_from(["test"])?.terminal_colors,
is_colouring_supported()
is_coloring_supported()
);
assert_eq!(try_with("--terminal-colors")?, true);
assert_eq!(try_with("--terminal-colors=false")?, false);
Expand Down

0 comments on commit 5f9eb90

Please sign in to comment.