Skip to content

Commit

Permalink
fix: only check stdin when rev is HEAD and a tty
Browse files Browse the repository at this point in the history
Refs: #102
  • Loading branch information
hdevalke committed Jan 13, 2023
1 parent 7bff516 commit b1bb07e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Command for CheckCommand {

let Config { merges, .. } = config;

if !stdin().is_terminal() {
if self.rev == "HEAD" && !stdin().is_terminal() {
let mut stdin = stdin().lock();
let mut commit_msg = String::new();
stdin.read_to_string(&mut commit_msg)?;
Expand Down

0 comments on commit b1bb07e

Please sign in to comment.