Skip to content

Commit

Permalink
Remove stderr comment output for generate-completion subcommand
Browse files Browse the repository at this point in the history
This doesn't serve much purpose so removing it
  • Loading branch information
JamyGolden committed May 22, 2024
1 parent f117e7b commit 6351ed6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Changed

- Remove stderr comment output for `tinty generate-completion`

## [0.14.0] - 2024-05-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn main() -> Result<()> {
Some(("generate-completion", sub_matches)) => {
if let Some(generator) = sub_matches.get_one::<Shell>("shell_name") {
let mut cmd = build_cli();
eprintln!("Generating completion file for {generator}...");

print_completions(*generator, &mut cmd);
return Ok(());
};
Expand Down
12 changes: 1 addition & 11 deletions tests/cli_generatecompletion_subcommand_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@ fn generate_shell_completion_test(shell_name: &str) -> Result<String> {
// ---
// Act
// ---
let (stdout, stderr) = utils::run_command(command_vec).unwrap();

// Ok((stdout, stderr, cleanup))

// ------
// Assert
// ------
assert!(
stderr.contains(format!("Generating completion file for {shell_name}...").as_str()),
"stderr does not contain the expected output"
);
let (stdout, _) = utils::run_command(command_vec).unwrap();

cleanup()?;
Ok(stdout)
Expand Down

0 comments on commit 6351ed6

Please sign in to comment.