aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python3.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-04 17:22:58 -0500
committerJack Nagel2014-07-04 17:46:52 -0500
commit1af5eb06b3ba81756bde672f781a17e64cf05617 (patch)
tree271c0919b5d5fb5a1595df1fa5ce2793b7f199d1 /Library/Formula/python3.rb
parentaf9f984c37b7bcbd15061dd98320984d3978d6dd (diff)
downloadhomebrew-1af5eb06b3ba81756bde672f781a17e64cf05617.tar.bz2
Simpler "use the correct symlink" checks
When determining whether to remove a symlink during unlinking, we check three things: (a) Is the destination a symlink? (b) Does the destination exist? (c) Does the destination resolve to the source path? However, since we know that the source path exists, (b) is guaranteed if (a) and (c) are true. Thus checking (b) is unnecessary. Similarly, when creating a new symlink during linking, we first check to see if the link already exists by checking the same three criteria. Again, checking (b) is unnecessary here. See also the expanded test coverage in b52b579b. Addendum: although we know that the source path exists during unlinking, it doesn't matter. If the source path does not exist, then we still know we have a broken symlink pointing into the keg we are unlinking, and removing that symlink is still safe.
Diffstat (limited to 'Library/Formula/python3.rb')
0 files changed, 0 insertions, 0 deletions