Skip to content

Commit

Permalink
Made sure default alias isn't printed if it's pointing to non-existen…
Browse files Browse the repository at this point in the history
…t entry
  • Loading branch information
shyiko committed Sep 20, 2017
1 parent cba5c4a commit 662b752
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions command/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ func linkAlias(name string, vs []*semver.Version) error {
}
}
} else {
log.Info(sourceRef + " -/> " + sourceTarget)
if err := os.Remove(source); !os.IsNotExist(err) {
err := os.Remove(source)
if err == nil {
log.Info(sourceRef + " -/> " + sourceTarget)
}
if !os.IsNotExist(err) {
return err
}
}
Expand Down

0 comments on commit 662b752

Please sign in to comment.