Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: VSCode desktop connection #7120

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 23 commits into from
Apr 14, 2023
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
WIP
  • Loading branch information
matifali committed Apr 14, 2023
commit 586e7cbafe5bb953695219b8fdb54ddb0dcbe2df
11 changes: 2 additions & 9 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,20 +1406,13 @@ func expandDirectory(dir string) (string, error) {
return "", err
}
dir = filepath.Join(home, dir[1:])

} else if !filepath.IsAbs(dir) {
// If the directory is not absolute, we assume it is relative to the
// user's home directory.
}
if !filepath.IsAbs(dir) {
home, err := userHomeDir()
if err != nil {
return "", err
}
dir = filepath.Join(home, dir)

} else {
// If the directory is absolute, we assume it is an absolute path.
// We do not check if the directory exists.
return dir, nil
}
return os.ExpandEnv(dir), nil
}