diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 077b9f6997..101d641786 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -714,7 +714,6 @@ abstract class PackageBuildCommand : Command { auto pack = dub.packageManager.getFirstPackage(package_name); enforce(pack, "Failed to find a package named '"~package_name~"' locally."); logInfo("Building package %s in %s", pack.name, pack.path.toNativeString()); - dub.rootPath = pack.path; dub.loadPackage(pack); return true; } diff --git a/test/issue1556.sh b/test/issue1556.sh new file mode 100755 index 0000000000..4c0e414601 --- /dev/null +++ b/test/issue1556.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +. $(dirname "${BASH_SOURCE[0]}")/common.sh + +${DUB} --cache=local remove optional || true +${DUB} --cache=local remove bolts || true +${DUB} --cache=local fetch optional +${DUB} --cache=local build optional --compiler=${DC} +