Browse Source

action => description

content-update
xpetit 3 years ago
parent
commit
35705cc03a
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 6
      sh/debian/ubuntu/system/usr/local/src/format/main.go

6
sh/debian/ubuntu/system/usr/local/src/format/main.go diff.vendored

@ -39,11 +39,11 @@ func renderTable(data [][]string) {
}
// run returns the output of the command
// In case of error, display the action intended, the command and the error
func run(action, name string, arg ...string) []byte {
// In case of error, display the description, the command and the error
func run(description, name string, arg ...string) []byte {
b, err := exec.Command(name, arg...).CombinedOutput()
if err != nil {
fmt.Println("Failed to", action)
fmt.Println("Failed to", description)
fmt.Printf("%s %#v\n", name, arg)
if _, ok := err.(*exec.ExitError); ok {
fatalln(string(b))

Loading…
Cancel
Save