Fix #2706: Dub run ignores locally registered packages
The code was overly complicated and failed to do what it intended. If a version was provided, it would always call 'fetch' even though getBestPackage would have returned something. Assuming that sub-packages are always present is also not working, as the following would fail: $ rm -rf ~/.dub/packages/vibe-d && dub run vibe-d:data Warning Package 'vibe-d:data' was neither found locally nor online. The new code is both shorter and simpler, taking advantage of the various improvements made to the APIs over the year (for example, getBestPackage with VersionRange.Any does the right thing). |
---|
|
source/dub/commandline.d |
---|