Skip to content

Commit

Permalink
if Verbose, output command before running
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk committed Sep 22, 2018
1 parent 4611215 commit da7e544
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vagrant
import (
"context"
"fmt"
"log"
"os"
"os/exec"
"sync"
Expand Down Expand Up @@ -90,6 +91,10 @@ func (b *BaseCommand) Run() error {

// Start the command. You must call Wait() to complete execution.
func (b *BaseCommand) Start() error {
if b.Verbose {
log.Printf("Running %v %v", b.cmd.Path, b.cmd.Args)
}

if err := b.cmd.Start(); err != nil {
return err
}
Expand Down

0 comments on commit da7e544

Please sign in to comment.