func RequireVersion(r *version.R) { vs := cmd.Table("docker", "--version")[0][2] vs = strings.Trim(vs, ",") v := version.Version(vs) if !r.IsSatisfiedBy(v) { cli.Fatalf("got docker version %s; want %s", v, r) } }
func RequireVersion(r *version.R) { if c := cmd.ExitCode("git", "--version"); c != 0 { cli.Fatalf("git required") } v := version.Version(cmd.Table("git", "--version")[0][2]) if !r.IsSatisfiedBy(v) { cli.Fatalf("you have git version %s; want %s", v, r.Original) } }