Пример #1
0
// Command returns the command that will be executed by Resolve.
func Command(dst string) []string {
	code := []string{
		`require "berkshelf";`,
		`b = Berkshelf::Berksfile.from_file("Berksfile");`,
		`Berkshelf::Berksfile.method_defined?(:vendor)`, `?`,
		fmt.Sprintf(`b.vendor("%s")`, dst), `:`,
		fmt.Sprintf(`b.install(:path => "%s")`, dst),
	}
	cmd := append([]string{"ruby", "-e"}, strings.Join(code, " "))
	return bundler.Command(cmd)
}
Пример #2
0
// Command returns the command that will be executed by Resolve.
func Command(dst string) []string {
	cmd := []string{"librarian-chef", "install", "--path", dst}
	return bundler.Command(cmd)
}