feat: Add --remote (#1387)

Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
anqiansong
2021-12-29 18:16:42 +08:00
committed by GitHub
parent 23deaf50e6
commit b8ea16a88e
12 changed files with 265 additions and 31 deletions

View File

@@ -18,7 +18,13 @@ func Action(ctx *cli.Context) error {
o := strings.TrimSpace(ctx.String("dir"))
s := ctx.String("style")
home := ctx.String("home")
remote := ctx.String("remote")
if len(remote) > 0 {
repo, _ := file.CloneIntoGitHome(remote)
if len(repo) > 0 {
home = repo
}
}
if len(home) > 0 {
file.RegisterGoctlHome(home)
}