diff --git a/cmd/agent/container/setup.go b/cmd/agent/container/setup.go index 180bb6419..ee3d5980a 100644 --- a/cmd/agent/container/setup.go +++ b/cmd/agent/container/setup.go @@ -449,7 +449,7 @@ func (cmd *SetupContainerCmd) installIDE(setupInfo *config.Result, ide *provider } func (cmd *SetupContainerCmd) setupVSCode(setupInfo *config.Result, ideOptions map[string]config2.OptionValue, flavor vscode.Flavor, log log.Logger) error { - log.Debugf("Setup %s...", flavor) + log.Debugf("Setup %s...", flavor.DisplayName()) vsCodeConfiguration := config.GetVSCodeConfiguration(setupInfo.MergedConfig) settings := "" if len(vsCodeConfiguration.Settings) > 0 { diff --git a/pkg/ide/vscode/open.go b/pkg/ide/vscode/open.go index d3e5c6ba4..dc44ce17f 100644 --- a/pkg/ide/vscode/open.go +++ b/pkg/ide/vscode/open.go @@ -14,13 +14,17 @@ import ( ) func Open(ctx context.Context, workspace, folder string, newWindow bool, flavor Flavor, log log.Logger) error { - log.Infof("Starting %s...", flavor) + log.Infof("Starting %s...", flavor.DisplayName()) cliErr := openViaCLI(ctx, workspace, folder, newWindow, flavor, log) if cliErr == nil { return nil } browserErr := openViaBrowser(workspace, folder, newWindow, flavor, log) + if browserErr == nil { + return nil + } + return errors.Join(cliErr, browserErr) } diff --git a/pkg/ide/vscode/vscode.go b/pkg/ide/vscode/vscode.go index 641600089..7d004a919 100644 --- a/pkg/ide/vscode/vscode.go +++ b/pkg/ide/vscode/vscode.go @@ -33,6 +33,23 @@ const ( FlavorCodium Flavor = "codium" ) +func (f Flavor) DisplayName() string { + switch f { + case FlavorStable: + return "VSCode" + case FlavorInsiders: + return "VSCode Insiders" + case FlavorCursor: + return "Cursor" + case FlavorPositron: + return "positron" + case FlavorCodium: + return "VSCodium" + default: + return "VSCode" + } +} + var Options = ide.Options{ OpenNewWindow: { Name: OpenNewWindow,