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

Skip to content

Commit b10f240

Browse files
committed
WIP
1 parent d13c1c3 commit b10f240

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

agent/agent.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,13 +1407,13 @@ func expandDirectory(dir string) (string, error) {
14071407
}
14081408
dir = filepath.Join(home, dir[1:])
14091409
}
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-
// }
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+
}
14181418
return os.ExpandEnv(dir), nil
14191419
}

0 commit comments

Comments
 (0)