Skip to content

Commit 5fd49b6

Browse files
matthijskooijmancmaglie
authored andcommitted
Use utils.ExecCommand for running ctags
This slightly simplifies the code. Signed-off-by: Matthijs Kooijman <[email protected]>
1 parent 0e419c6 commit 5fd49b6

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Diff for: ctags_runner.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
package builder
3131

3232
import (
33-
"os"
34-
3533
"github.com/arduino/arduino-builder/constants"
3634
"github.com/arduino/arduino-builder/ctags"
3735
"github.com/arduino/arduino-builder/i18n"
@@ -61,12 +59,7 @@ func (s *CTagsRunner) Run(ctx *types.Context) error {
6159
return i18n.WrapError(err)
6260
}
6361

64-
verbose := ctx.Verbose
65-
if verbose {
66-
logger.UnformattedFprintln(os.Stdout, commandLine)
67-
}
68-
69-
sourceBytes, err := command.Output()
62+
sourceBytes, _, err := utils.ExecCommand(ctx, command, utils.Capture /* stdout */, utils.Ignore /* stderr */)
7063
if err != nil {
7164
return i18n.WrapError(err)
7265
}

0 commit comments

Comments
 (0)