Skip to content

feat(cli): add coder open vscode #11191

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 18 commits into from
Jan 2, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
move if to switch
  • Loading branch information
mafredri committed Jan 2, 2024
commit 7c3f48bb486c782479632e8ac342b1ba3095cecd
5 changes: 2 additions & 3 deletions cli/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,10 @@ func windowsJoinPath(elem ...string) string {
// If the path is being resolved within the workspace, the path will be resolved
// relative to the current working directory.
func resolveAgentAbsPath(workingDirectory, relOrAbsPath, agentOS string, local bool) (string, error) {
if relOrAbsPath == "" {
switch {
case relOrAbsPath == "":
return workingDirectory, nil
}

switch {
case relOrAbsPath == "~" || strings.HasPrefix(relOrAbsPath, "~/"):
return "", xerrors.Errorf("path %q requires expansion and is not supported, use an absolute path instead", relOrAbsPath)

Expand Down