Skip to content

Commit b2e320b

Browse files
committed
Removed no more used executils.Command
1 parent 9037215 commit b2e320b

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

Diff for: executils/executils.go

-18
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package executils
1717

1818
import (
1919
"bytes"
20-
"fmt"
2120
"io"
2221
"os/exec"
2322
)
@@ -71,20 +70,3 @@ func call(stack []*exec.Cmd, pipes []*io.PipeWriter) (err error) {
7170
func TellCommandNotToSpawnShell(cmd *exec.Cmd) {
7271
tellCommandNotToSpawnShell(cmd)
7372
}
74-
75-
// Command creates a command with the provided command line arguments.
76-
// The first argument is the path to the executable, the remainder are the
77-
// arguments to the command.
78-
func Command(args ...string) (*exec.Cmd, error) {
79-
if args == nil || len(args) == 0 {
80-
return nil, fmt.Errorf("no executable specified")
81-
}
82-
cmd := exec.Command(args[0], args[1:]...)
83-
TellCommandNotToSpawnShell(cmd)
84-
85-
// This is required because some tools detects if the program is running
86-
// from terminal by looking at the stdin/out bindings.
87-
// https://github.com/arduino/arduino-cli/issues/844
88-
cmd.Stdin = NullReader
89-
return cmd, nil
90-
}

0 commit comments

Comments
 (0)