Skip to content

Commit

Permalink
fix(Zed): remove the double leading slashes on project
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Jan 18, 2025
1 parent 6a1c487 commit a071726
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/ide/zed/zed.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import (
func Open(ctx context.Context, values map[string]config.OptionValue, userName, workspaceFolder, workspaceID string, log log.Logger) error {
log.Info("Opening Zed editor...")

sshHost := fmt.Sprintf("%s.devpod/%s", workspaceID, workspaceFolder)
if len(workspaceFolder) == 0 || workspaceFolder[0] != '/' {
workspaceFolder = fmt.Sprintf("/%s", workspaceFolder)
}

sshHost := fmt.Sprintf("%s.devpod%s", workspaceID, workspaceFolder)
openURL := fmt.Sprintf("zed://ssh/%s", sshHost)
err := open.Run(openURL)
if err != nil {
Expand Down

0 comments on commit a071726

Please sign in to comment.