Consider this case:
/usr/local/bin/dart ==> /usr/local/Cellar/dart/1.5.3/bin/dart ==> /usr/local/Cellar/dart/1.5.3/libexec/bin/dart
This is what homebrew does.
The code in dartSdkDirectory assumed that which dart points to the physical location of dart.
Consider this case:
/usr/local/bin/dart ==> /usr/local/Cellar/dart/1.5.3/bin/dart ==> /usr/local/Cellar/dart/1.5.3/libexec/bin/dart
This is what homebrew does.
The code in dartSdkDirectory assumed that
which dartpoints to the physical location ofdart.