@@ -47,7 +47,6 @@ func CreateSymlink(cwd string, dir string) error {
47
47
48
48
// RemoveSymlink : remove symlink
49
49
func RemoveSymlink (symlinkPath string ) error {
50
-
51
50
_ , err := os .Lstat (symlinkPath )
52
51
if err != nil {
53
52
return fmt .Errorf (`
@@ -75,7 +74,6 @@ func RemoveSymlink(symlinkPath string) error {
75
74
76
75
// CheckSymlink : check file is symlink
77
76
func CheckSymlink (symlinkPath string ) bool {
78
-
79
77
fi , err := os .Lstat (symlinkPath )
80
78
if err != nil {
81
79
return false
@@ -101,8 +99,7 @@ func ChangeSymlink(binVersionPath string, binPath string) {
101
99
102
100
// ChangeProductSymlink : move symlink for product to existing binary
103
101
func ChangeProductSymlink (product Product , binVersionPath string , userBinPath string ) error {
104
-
105
- homedir := GetHomeDirectory () //get user's home directory
102
+ homedir := GetHomeDirectory () // get user's home directory
106
103
homeBinPath := filepath .Join (homedir , "bin" , product .GetExecutableName ())
107
104
possibleInstallLocations := []string {userBinPath , homeBinPath }
108
105
var err error
@@ -126,7 +123,7 @@ func ChangeProductSymlink(product Product, binVersionPath string, userBinPath st
126
123
127
124
if err == nil {
128
125
return fmt .Errorf ("Unable to find existing directory in %q. %s" ,
129
- strings . Join (possibleInstallLocations , " or " ),
126
+ strings .Join (possibleInstallLocations , " or " ),
130
127
"Manually create one of them and try again." )
131
128
}
132
129
0 commit comments