Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d13c1c3 commit b10f240Copy full SHA for b10f240
agent/agent.go
@@ -1407,13 +1407,13 @@ func expandDirectory(dir string) (string, error) {
1407
}
1408
dir = filepath.Join(home, dir[1:])
1409
1410
- // if the directory is not absolute, we make it absolute
1411
- // if !filepath.IsAbs(dir) {
1412
- // home, err := userHomeDir()
1413
- // if err != nil {
1414
- // return "", err
1415
- // }
1416
- // dir = filepath.Join(home, dir)
1417
+ //if the directory is not absolute, we make it absolute
+ if !filepath.IsAbs(dir) {
+ home, err := userHomeDir()
+ if err != nil {
+ return "", err
+ }
+ dir = filepath.Join(home, dir)
1418
return os.ExpandEnv(dir), nil
1419
0 commit comments