19 lines
301 B
Go
19 lines
301 B
Go
|
package commands
|
||
|
|
||
|
import (
|
||
|
"ocl/portainer-devtool/utils"
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
func ListBranches(workdir string) error {
|
||
|
cmd := exec.Command("git", "branch")
|
||
|
cmd.Dir = workdir
|
||
|
out, err := cmd.Output()
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
utils.PrintOutput("Your current checkout branch", out)
|
||
|
return nil
|
||
|
}
|