这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions cli/internal/login/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ type LinkCommand struct {
Ui *cli.ColoredUi
}

// Synopsis of run command
// Synopsis of link command
func (c *LinkCommand) Synopsis() string {
return "Link your local directory to a Vercel organization and enable remote caching."
}

// Help returns information about the `run` command
// Help returns information about the `link` command
func (c *LinkCommand) Help() string {
helpText := `
Usage: turbo link
Expand All @@ -43,7 +43,7 @@ Options:
return strings.TrimSpace(helpText)
}

// Run executes tasks in the monorepo
// Run links a local directory to a Vercel organization and enables remote caching
func (c *LinkCommand) Run(args []string) int {
var dontModifyGitIgnore bool
shouldSetup := true
Expand Down Expand Up @@ -108,10 +108,14 @@ func (c *LinkCommand) Run(args []string) int {
}

var chosenTeamName string
nameWithFallback := userResponse.User.Name
if nameWithFallback == "" {
nameWithFallback = userResponse.User.Username
}
survey.AskOne(
&survey.Select{
Message: "Which Vercel scope (and Remote Cache) do you want associate with this Turborepo? ",
Options: append([]string{userResponse.User.Name}, teamOptions...),
Options: append([]string{nameWithFallback}, teamOptions...),
},
&chosenTeamName,
survey.WithValidator(survey.Required),
Expand Down