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).
1 parent 9566425 commit d65decbaab2bc2f0304558f589c0339a6e041828
@Mathias Lang Mathias Lang authored on 9 Jan 2024
Mathias LANG committed on 9 Jan 2024
Showing 1 changed file
View
source/dub/commandline.d