Skip to content

feat(cli): support opening devcontainers in vscode #17189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 3, 2025
Prev Previous commit
chore: replace windowsToUnixPath with filepath.ToSlash
  • Loading branch information
DanielleMaywood committed Apr 3, 2025
commit e63db0c75f9478ba0b54a3ba381fb1aab80e3ee8
6 changes: 1 addition & 5 deletions cli/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ func buildVSCodeWorkspaceDevContainerLink(
containerName string,
containerFolder string,
) (*url.URL, url.Values) {
containerFolder = windowsToUnixPath(containerFolder)
containerFolder = filepath.ToSlash(containerFolder)

qp := url.Values{}
qp.Add("url", clientURL)
Expand Down Expand Up @@ -525,10 +525,6 @@ func unixToWindowsPath(p string) string {
return strings.ReplaceAll(p, "/", "\\")
}

func windowsToUnixPath(p string) string {
return strings.ReplaceAll(p, "\\", "/")
}

// resolveAgentAbsPath resolves the absolute path to a file or directory in the
// workspace. If the path is relative, it will be resolved relative to the
// workspace's expanded directory. If the path is absolute, it will be returned
Expand Down
Loading