~porcellis/t

ref: structure t/commands/sync.go -rw-r--r-- 317 bytes
76f0d055 — Pedro Lucas Porcellis Generate a simple and nice doc 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package commands

import (
	"git.sr.ht/~porcellis/t/config"
	"os"
	"os/exec"
)

func Sync(config config.TConfig) error {
	cmd := exec.Command("git", "-C", config.BasePath, "push", config.GitRemote, "-u", "--quiet")
	cmd.Stdin = nil
	cmd.Stdout = os.NewFile(0, os.DevNull)
	cmd.Stderr = os.Stderr

	return cmd.Run()
}