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 2e5639a commit 4bae3e9Copy full SHA for 4bae3e9
agent/agent.go
@@ -1406,17 +1406,14 @@ func expandDirectory(dir string) (string, error) {
1406
return "", err
1407
}
1408
dir = filepath.Join(home, dir[1:])
1409
- }
1410
- //if the directory is not absolute, we make it absolute
1411
- else if dir[0] != '/' {
+ } else if dir[0] != '/' {
1412
home, err := userHomeDir()
1413
if err != nil {
1414
1415
1416
dir = filepath.Join(home, dir)
1417
1418
- else {
1419
- return "", fmt.Errorf("not a valid directory"
+ } else {
+ return "", fmt.Errorf("not a valid directory")
1420
1421
return os.ExpandEnv(dir), nil
1422
0 commit comments