mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-01 13:17:53 +02:00
show output line by line in deploy script
This commit is contained in:
parent
176aa62fe0
commit
77191ea67c
@ -10,12 +10,14 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
version, err := ioutil.ReadFile("VERSION")
|
||||
if err != nil {
|
||||
log.Panicln(err.Error())
|
||||
@ -47,9 +49,15 @@ func main() {
|
||||
|
||||
func runCommand(args ...string) {
|
||||
fmt.Println(strings.Join(args, " "))
|
||||
output, err := exec.Command(args[0], args[1:]...).CombinedOutput()
|
||||
cmd := exec.Command(args[0], args[1:]...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
err := cmd.Start()
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
err = cmd.Wait()
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
log.Print(string(output))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user