mirror of
https://github.com/wahyd4/jabba.git
synced 2026-08-09 04:46:17 +10:00
Suppressed -/> output unless link is successfully removed
This commit is contained in:
+5
-2
@@ -49,8 +49,11 @@ func LinkLatest() error {
|
||||
target := GetLink(sourceVersion)
|
||||
_, err := LsBestMatchWithVersionSlice(vs, sourceVersion)
|
||||
if err != nil {
|
||||
log.Info(sourceVersion + " -/> " + target)
|
||||
if err := os.Remove(filepath.Join(cfg.Dir(), "jdk", sourceVersion)); !os.IsNotExist(err) {
|
||||
err := os.Remove(filepath.Join(cfg.Dir(), "jdk", sourceVersion))
|
||||
if err == nil {
|
||||
log.Info(sourceVersion + " -/> " + target)
|
||||
}
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user