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

Skip to content

Commit 2e5639a

Browse files
committed
fix fix logic to pass tests
1 parent d8afe9b commit 2e5639a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/agent.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,5 +1415,8 @@ func expandDirectory(dir string) (string, error) {
14151415
}
14161416
dir = filepath.Join(home, dir)
14171417
}
1418+
else {
1419+
return "", fmt.Errorf("not a valid directory"
1420+
}
14181421
return os.ExpandEnv(dir), nil
14191422
}

0 commit comments

Comments
 (0)