func ExecLine()

in cli/exec.go [33:52]


func ExecLine(line string) error {
	config.Debug("ExecLine line:", line)
	args, err := shlex.Split(line)
	if err != nil {
		return err
	}

	if runtime.GOOS != "windows" {
		for _, arg := range args {
			if arg == "|" {
				fullCommand := fmt.Sprintf("%s %v", strings.Join(os.Args, " "), line)
				result, err := exec.Command("bash", "-c", fullCommand).Output()
				fmt.Print(string(result))
				return err
			}
		}
	}

	return ExecCmd(args)
}