Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/brevdev/brev-cli

go 1.22.6
go 1.24.0

require (
github.com/alessio/shellescape v1.4.1
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/time v0.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=
golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/configureenvvars/configureenvvars_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export ` + BrevManagedEnvVarsKey + "=foo",
got := generateExportString(tt.args.brevEnvsString, tt.args.envFileContents)
diff := cmp.Diff(tt.want, got)
if diff != "" {
t.Fatalf(diff)
t.Fatalf("%v", diff)
}
})
}
Expand Down Expand Up @@ -234,7 +234,7 @@ func Test_addUnsetEntriesToOutput(t *testing.T) {
got := addUnsetEntriesToOutput(tt.args.currentEnvs, tt.args.newEnvs, tt.args.output)
diff := cmp.Diff(tt.want, got)
if diff != "" {
t.Fatalf(diff)
t.Fatalf("%v", diff)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/configureenvvars/lex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ alice=bob`,
}
diff := cmp.Diff(out, tt.want, cmp.AllowUnexported(item{}))
if diff != "" {
t.Fatalf(diff)
t.Fatalf("%v", diff)
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/connect/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewCmdConnect(t *terminal.Terminal, store connectStore) *cobra.Command {

func RunConnect(t *terminal.Terminal, _ []string, _ connectStore) error {
t.Vprintf("Connect the AWS IAM user to create instances in your AWS account.\n")
t.Vprintf(t.Yellow("\tFollow the guide here: %s", "https://onboarding.brev.dev/connect-aws\n\n"))
t.Vprintf("%v", t.Yellow("\tFollow the guide here: %s", "https://onboarding.brev.dev/connect-aws\n\n"))
// t.Vprintf(t.Yellow("Connect the AWS IAM user to create dev environments in your AWS account.\n\n"))

AccessKeyID := terminal.PromptGetInput(terminal.PromptContent{
Expand All @@ -50,8 +50,8 @@ func RunConnect(t *terminal.Terminal, _ []string, _ connectStore) error {
})

t.Vprintf("\n")
t.Vprintf(AccessKeyID)
t.Vprintf(SecretAccessKey)
t.Vprintf("%v", AccessKeyID)
t.Vprintf("%v", SecretAccessKey)

return nil
}
2 changes: 1 addition & 1 deletion pkg/cmd/copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@
}

func startWorkspaceIfStopped(t *terminal.Terminal, s *spinner.Spinner, tstore CopyStore, wsIDOrName string, workspace *entity.Workspace) error {
activeOrg, err := tstore.GetActiveOrganizationOrDefault()

Check failure on line 266 in pkg/cmd/copy/copy.go

View workflow job for this annotation

GitHub Actions / ci (ubuntu-22.04)

tstore.GetActiveOrganizationOrDefault undefined (type CopyStore has no field or method GetActiveOrganizationOrDefault) (typecheck)

Check failure on line 266 in pkg/cmd/copy/copy.go

View workflow job for this annotation

GitHub Actions / ci (ubuntu-22.04)

tstore.GetActiveOrganizationOrDefault undefined (type CopyStore has no field or method GetActiveOrganizationOrDefault) (typecheck)
if err != nil {
return breverrors.WrapAndTrace(err)
}
workspaces, err := tstore.GetWorkspaceByNameOrID(activeOrg.ID, wsIDOrName)

Check failure on line 270 in pkg/cmd/copy/copy.go

View workflow job for this annotation

GitHub Actions / ci (ubuntu-22.04)

tstore.GetWorkspaceByNameOrID undefined (type CopyStore has no field or method GetWorkspaceByNameOrID) (typecheck)

Check failure on line 270 in pkg/cmd/copy/copy.go

View workflow job for this annotation

GitHub Actions / ci (ubuntu-22.04)

tstore.GetWorkspaceByNameOrID undefined (type CopyStore has no field or method GetWorkspaceByNameOrID) (typecheck)
if err != nil {
return breverrors.WrapAndTrace(err)
}
Expand All @@ -275,7 +275,7 @@
if err != nil {
return breverrors.WrapAndTrace(err)
}
t.Vprintf(t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
t.Vprintf("%s", t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
err = pollUntil(s, workspace.ID, entity.Running, tstore, " hang tight 🤙")
if err != nil {
return breverrors.WrapAndTrace(err)
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ func resolveWorkspaceUserOptions(options *store.CreateWorkspacesOptions, user *e
}

func displayConnectBreadCrumb(t *terminal.Terminal, workspace *entity.Workspace) {
t.Vprintf(t.Green("Connect to the instance:\n"))
t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open <NAME> -> open instance in VS Code\n", workspace.Name)))
t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell <NAME> -> ssh into instance (shortcut)\n", workspace.Name)))
t.Vprintf("%v",t.Green("Connect to the instance:\n"))
t.Vprintf("%v", t.Yellow(fmt.Sprintf("\tbrev open %s\t# brev open <NAME> -> open instance in VS Code\n", workspace.Name)))
t.Vprintf("%v", t.Yellow(fmt.Sprintf("\tbrev shell %s\t# brev shell <NAME> -> ssh into instance (shortcut)\n", workspace.Name)))
// t.Vprintf(t.Yellow(fmt.Sprintf("\tssh %s\t# ssh <SSH-NAME> -> ssh directly to dev environment\n", workspace.GetLocalIdentifier())))
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/fu/fu.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ func fuUser(userID string, t *terminal.Terminal, fuStore FuStore) error {
for _, workspace := range allWorkspaces {
_, err2 := fuStore.DeleteWorkspace(workspace.ID)
if err2 != nil {
t.Vprintf(t.Red("Failed to delete workspace with ID: %s\n", workspace.ID))
t.Vprintf(t.Red("Error: %s\n", err.Error()))
t.Vprintf("%s", t.Red("Failed to delete workspace with ID: %s\n", workspace.ID))
t.Vprintf("%s", t.Red("Error: %s\n", err.Error()))
continue
}
t.Vprintf("✅ Deleted workspace %s\n", workspace.Name)
}

err = fuStore.BanUser(userID)
if err != nil {
t.Vprintf(t.Red("Failed to ban user with ID: %s\n", userID))
t.Vprintf(t.Red("Error: %s\n", err.Error()))
t.Vprintf("%s", t.Red("Failed to ban user with ID: %s\n", userID))
t.Vprintf("%s", t.Red("Error: %s\n", err.Error()))
}
t.Vprint("\n")
t.Vprintf("🖕 Banned user %s\n", userID)
Expand Down
20 changes: 10 additions & 10 deletions pkg/cmd/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,26 +310,26 @@ func (o LoginOptions) showBreadCrumbs(t *terminal.Terminal, org *entity.Organiza
}
}

t.Vprintf(t.Green("current organization: ") + t.Yellow(fmt.Sprintf("%s\n", org.Name)))
t.Vprintf("%s", t.Green("current organization: ") + t.Yellow(fmt.Sprintf("%s\n", org.Name)))
if len(orgs) > 1 {
otherOrg := getOtherOrg(org, orgs)
t.Vprintf(t.Green("switch organizations:\n"))
t.Vprintf(t.Yellow("\tbrev set %s\n", otherOrg.Name))
t.Vprintf("%s", t.Green("switch organizations:\n"))
t.Vprintf("%s", t.Yellow("\tbrev set %s\n", otherOrg.Name))
}

if len(allWorkspaces) == 0 {
t.Vprintf(t.Green("create an instance:\n"))
t.Vprintf("%s", t.Green("create an instance:\n"))
}
if len(userWorkspaces) == 0 && len(allWorkspaces) > 1 {
t.Vprintf(t.Green("list teammates instances:\n"))
t.Vprintf(t.Yellow("\tbrev ls --all\n"))
t.Vprintf("%s", t.Green("list teammates instances:\n"))
t.Vprintf("%s", t.Yellow("\tbrev ls --all\n"))

t.Vprintf(t.Green("clone a teammate's instance:\n"))
t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev start %s\n", allWorkspaces[0].Name)))
t.Vprintf("%s", t.Green("clone a teammate's instance:\n"))
t.Vprintf("%s", t.Yellow(fmt.Sprintf("\tbrev start %s\n", allWorkspaces[0].Name)))
}
if len(userWorkspaces) > 0 {
t.Vprintf(t.Green("list your instances:\n"))
t.Vprintf(t.Yellow("\tbrev ls\n"))
t.Vprintf("%s", t.Green("list your instances:\n"))
t.Vprintf("%s", t.Yellow("\tbrev ls\n"))
}

return nil
Expand Down
24 changes: 12 additions & 12 deletions pkg/cmd/ls/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ func (ls Ls) RunOrgs() error {
displayOrgTable(ls.terminal, orgs, defaultOrg)
if len(orgs) > 1 {
fmt.Print("\n")
ls.terminal.Vprintf(ls.terminal.Green("Switch orgs:\n"))
ls.terminal.Vprintf("%s", ls.terminal.Green("Switch orgs:\n"))
notDefaultOrg := getOtherOrg(orgs, *defaultOrg)
// TODO suggest org with max workspaces
ls.terminal.Vprintf(ls.terminal.Yellow("\tbrev set <NAME> ex: brev set %s\n", notDefaultOrg.Name))
ls.terminal.Vprintf("%s", ls.terminal.Yellow("\tbrev set <NAME> ex: brev set %s\n", notDefaultOrg.Name))
}

return nil
Expand Down Expand Up @@ -307,15 +307,15 @@ func (ls Ls) displayWorkspacesAndHelp(org *entity.Organization, otherOrgs []enti
if len(userWorkspaces) == 0 {
ls.terminal.Vprint(ls.terminal.Yellow("No instances in org %s\n", org.Name))
if len(allWorkspaces) > 0 {
ls.terminal.Vprintf(ls.terminal.Green("See teammates' instances:\n"))
ls.terminal.Vprintf(ls.terminal.Yellow("\tbrev ls --all\n"))
ls.terminal.Vprintf("%s", ls.terminal.Green("See teammates' instances:\n"))
ls.terminal.Vprintf("%s", ls.terminal.Yellow("\tbrev ls --all\n"))
} else {
ls.terminal.Vprintf(ls.terminal.Green("Start a new instance:\n"))
ls.terminal.Vprintf("%s", ls.terminal.Green("Start a new instance:\n"))
}
if len(otherOrgs) > 1 {
ls.terminal.Vprintf(ls.terminal.Green("Switch to another org:\n"))
ls.terminal.Vprintf("%s", ls.terminal.Green("Switch to another org:\n"))
// TODO suggest org with max workspaces
ls.terminal.Vprintf(ls.terminal.Yellow(fmt.Sprintf("\tbrev set %s\n", getOtherOrg(otherOrgs, *org).Name)))
ls.terminal.Vprintf("%s", ls.terminal.Yellow(fmt.Sprintf("\tbrev set %s\n", getOtherOrg(otherOrgs, *org).Name)))
}
} else {
ls.terminal.Vprintf("You have %d instances in Org "+ls.terminal.Yellow(org.Name)+"\n", len(userWorkspaces))
Expand All @@ -333,14 +333,14 @@ func displayLsResetBreadCrumb(t *terminal.Terminal, workspaces []entity.Workspac
for _, w := range workspaces {
if w.Status == entity.Failure || getWorkspaceDisplayStatus(w) == entity.Unhealthy {
if !foundAResettableWorkspace {
t.Vprintf(t.Red("Reset unhealthy or failed instance:\n"))
t.Vprintf("%s", t.Red("Reset unhealthy or failed instance:\n"))
}
t.Vprintf(t.Yellow(fmt.Sprintf("\tbrev reset %s\n", w.Name)))
t.Vprintf("%s", t.Yellow(fmt.Sprintf("\tbrev reset %s\n", w.Name)))
foundAResettableWorkspace = true
}
}
if foundAResettableWorkspace {
t.Vprintf(t.Yellow("If this problem persists, run the command again with the --hard flag (warning: the --hard flag will not preserve uncommitted files!) \n\n"))
t.Vprintf("%s", t.Yellow("If this problem persists, run the command again with the --hard flag (warning: the --hard flag will not preserve uncommitted files!) \n\n"))
}
}

Expand Down Expand Up @@ -386,12 +386,12 @@ func displayProjects(t *terminal.Terminal, orgName string, projects []virtualpro
displayProjectsTable(projects)

fmt.Print("\n")
t.Vprintf(t.Green("Join a project:\n") +
t.Vprint(t.Green("Join a project:\n") +
t.Yellow(fmt.Sprintf("\tbrev start %s\n", projects[0].Name)))
} else {
t.Vprintf("no other projects in Org "+t.Yellow(orgName)+"\n", len(projects))
fmt.Print("\n")
t.Vprintf(t.Green("Invite a teamate:\n") +
t.Vprint(t.Green("Invite a teamate:\n") +
t.Yellow("\tbrev invite"))
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/ollama/ollama.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ func runOllamaWorkspace(t *terminal.Terminal, opts RunOptions, ollamaStore Ollam
}

func displayOllamaConnectBreadCrumb(t *terminal.Terminal, link string, model string) {
t.Vprintf(t.Green("Query the Ollama API with the following command:\n"))
t.Vprintf(t.Yellow(fmt.Sprintf("curl %s/api/chat -d '{\n \"model\": \"%s\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"why is the sky blue?\"\n }\n ]\n}'\n", link, model)))
t.Vprintf("%s", t.Green("Query the Ollama API with the following command:\n"))
t.Vprintf("%s", t.Yellow(fmt.Sprintf("curl %s/api/chat -d '{\n \"model\": \"%s\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"why is the sky blue?\"\n }\n ]\n}'\n", link, model)))
}

func pollInstanceUntilVMReady(workspace *entity.Workspace, interval time.Duration, timeout time.Duration, ollamaStore OllamaStore) (bool, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/open/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func startWorkspaceIfStopped(t *terminal.Terminal, tstore OpenStore, wsIDOrName
if err != nil {
return breverrors.WrapAndTrace(err)
}
t.Vprintf(t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
t.Vprintf("%s", t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
workspace, err = util.GetUserWorkspaceByNameOrIDErr(tstore, wsIDOrName)
if err != nil {
return breverrors.WrapAndTrace(err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/org/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ func RunOrgs(t *terminal.Terminal, store OrgCmdStore) error {
displayOrgTable(t, orgs, defaultOrg)
if len(orgs) > 1 {
fmt.Print("\n")
t.Vprintf(t.Green("Switch orgs:\n"))
t.Vprintf("%s", t.Green("Switch orgs:\n"))
notDefaultOrg := getOtherOrg(orgs, *defaultOrg)
// TODO suggest org with max workspaces
t.Vprintf(t.Yellow("\tbrev org set <NAME> ex: brev org set %s\n", notDefaultOrg.Name))
t.Vprintf("%s", t.Yellow("\tbrev org set <NAME> ex: brev org set %s\n", notDefaultOrg.Name))
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/portforward/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func startInput(t *terminal.Terminal) string {

port := localInput + ":" + remoteInput

t.Vprintf(t.Green("\n-p " + port + "\n"))
t.Vprintf("%s", t.Green("\n-p "+port+"\n"))

return port
}
4 changes: 2 additions & 2 deletions pkg/cmd/recreate/recreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, recreateStore recrea
}

t.Vprint(t.Green("\nYour instance is ready!"))
t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
t.Vprintf("%s", t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
return nil
}

Expand Down Expand Up @@ -178,7 +178,7 @@ func hardResetCreateEmptyWorkspace(t *terminal.Terminal, recreateStore recreateS
}

t.Vprint(t.Green("\nYour instance is ready!"))
t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
t.Vprintf("%s", t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/refresh/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewCmdRefresh(t *terminal.Terminal, store RefreshStore) *cobra.Command {
if err != nil {
return breverrors.WrapAndTrace(err)
}
t.Vprintf(t.Green("brev has been refreshed\n"))
t.Vprintf("%s", t.Green("brev has been refreshed\n"))
return nil
},
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/reset/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func hardResetCreateWorkspaceFromRepo(t *terminal.Terminal, resetStore ResetStor
}

t.Vprint(t.Green("\nYour instance is ready!"))
t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
t.Vprintf("%s", t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
return nil
}

Expand Down Expand Up @@ -187,7 +187,7 @@ func hardResetCreateEmptyWorkspace(t *terminal.Terminal, resetStore ResetStore,
}

t.Vprint(t.Green("\nYour instance is ready!"))
t.Vprintf(t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))
t.Vprintf("%s", t.Green("\nSSH into your machine:\n\tssh %s\n", w.GetLocalIdentifier()))

return nil
}
Expand Down Expand Up @@ -245,7 +245,7 @@ func resetWorkspace(workspaceName string, t *terminal.Terminal, resetStore Reset
return breverrors.WrapAndTrace(err)
}

t.Vprintf(t.Yellow("Instance %s is resetting.\n", startedWorkspace.Name))
t.Vprintf("%s", t.Yellow("Instance %s is resetting.\n", startedWorkspace.Name))
t.Vprintf("Note: this can take a few seconds. Run 'brev ls' to check status\n")

return nil
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/secret/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewCmdSecret(secretStore SecretStore, t *terminal.Terminal) *cobra.Command

func addSecret(secretStore SecretStore, t *terminal.Terminal, envtype string, name string, value string, path string, scope string) error { //nolint:funlen, gocyclo // todo simplify me
if name == "" || envtype == "" || value == "" || path == "" {
t.Vprintf(t.Yellow("\nSome flags omitted, running interactive mode!\n"))
t.Vprintf("%s", t.Yellow("\nSome flags omitted, running interactive mode!\n"))
}

if name == "" {
Expand Down Expand Up @@ -191,14 +191,14 @@ func addSecret(secretStore SecretStore, t *terminal.Terminal, envtype string, na
secret, err := secretStore.CreateSecret(b)
if err != nil {
s.Stop()
t.Vprintf(t.Red(err.Error()))
t.Vprintf("%s", t.Red(err.Error()))
return breverrors.WrapAndTrace(err)
}
t.Vprintf(secret.Name)
t.Vprint(secret.Name)
s.Suffix = " environment secret added"
s.Stop()

t.Vprintf(t.Green("\nEnvironment %s added\n", iType) + t.Yellow("\tNote: It might take up to 2 minutes to load into your environment."))
t.Vprintf("%s", t.Green("\nEnvironment %s added\n", iType)+t.Yellow("\tNote: It might take up to 2 minutes to load into your environment."))

return nil
}
2 changes: 1 addition & 1 deletion pkg/cmd/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func startWorkspaceIfStopped(t *terminal.Terminal, s *spinner.Spinner, tstore Sh
if err != nil {
return breverrors.WrapAndTrace(err)
}
t.Vprintf(t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
t.Vprintf("%s", t.Yellow("Instance %s is starting. \n\n", startedWorkspace.Name))
err = pollUntil(s, workspace.ID, entity.Running, tstore, " hang tight 🤙")
if err != nil {
return breverrors.WrapAndTrace(err)
Expand Down
12 changes: 6 additions & 6 deletions pkg/cmd/sshkeys/sshkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ func NewCmdSSHKeys(t *terminal.Terminal, sshKeyStore SSHKeyStore) *cobra.Command
}

func DisplaySSHKeys(t *terminal.Terminal, publicKey string) {
t.Vprintf(publicKey)
t.Vprintf("%s", publicKey)
t.Print("\n")
t.Eprintf(t.Yellow("Copy 👆 and add it to your git provider:\n"))
t.Eprintf(t.Yellow("\tGithub: https://github.com/settings/keys\n"))
t.Eprintf(t.Yellow("\tGitlab: https://gitlab.com/-/profile/keys\n"))
t.Eprintf(t.Yellow("Check authentication by starting a new instance\n"))
t.Eprintf(t.Yellow("\tbrev start --empty --name test-ssh && brev delete test-ssh\n"))
t.Eprintf("%s", t.Yellow("Copy 👆 and add it to your git provider:\n"))
t.Eprintf("%s", t.Yellow("\tGithub: https://github.com/settings/keys\n"))
t.Eprintf("%s", t.Yellow("\tGitlab: https://gitlab.com/-/profile/keys\n"))
t.Eprintf("%s", t.Yellow("Check authentication by starting a new instance\n"))
t.Eprintf("%s", t.Yellow("\tbrev start --empty --name test-ssh && brev delete test-ssh\n"))
}
Loading
Loading