Skip to content

Commit

Permalink
fix: skip output for interactive commands if configured (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox authored May 18, 2023
1 parent d999109 commit 7679af6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/lefthook/runner/execute_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (e CommandExecutor) Execute(opts ExecuteOptions, out io.Writer) error {
command.Env = append(os.Environ(), envList...)

if opts.interactive {
command.Stdout = os.Stdout
command.Stdout = out
command.Stdin = stdin
command.Stderr = os.Stderr
err := command.Start()
Expand Down
2 changes: 1 addition & 1 deletion internal/lefthook/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func (r *Runner) run(opts ExecuteOptions, follow bool) bool {
defer log.UnsetName(opts.name)

if (follow || opts.interactive) && !r.SkipSettings.SkipExecution() {
log.Info(log.Cyan("\n EXECUTE > "), log.Bold(opts.name))
log.Info(log.Cyan("\n EXECUTE >"), log.Bold(opts.name))

var out io.Writer
if r.SkipSettings.SkipExecutionOutput() {
Expand Down

0 comments on commit 7679af6

Please sign in to comment.