diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 0269f9c..9784133 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -714,7 +714,6 @@ 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-fetch-and-build-pkgs/.no_build b/test/issue1556-fetch-and-build-pkgs/.no_build new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/issue1556-fetch-and-build-pkgs/.no_build diff --git a/test/issue1556-fetch-and-build-pkgs/dependency-package-1.0.0.zip b/test/issue1556-fetch-and-build-pkgs/dependency-package-1.0.0.zip new file mode 100644 index 0000000..b4aa2e6 --- /dev/null +++ b/test/issue1556-fetch-and-build-pkgs/dependency-package-1.0.0.zip Binary files differ diff --git a/test/issue1556-fetch-and-build-pkgs/main-package-1.0.0.zip b/test/issue1556-fetch-and-build-pkgs/main-package-1.0.0.zip new file mode 100644 index 0000000..87e945c --- /dev/null +++ b/test/issue1556-fetch-and-build-pkgs/main-package-1.0.0.zip Binary files differ diff --git a/test/issue1556-fetch-and-build.sh b/test/issue1556-fetch-and-build.sh new file mode 100755 index 0000000..9e2fec4 --- /dev/null +++ b/test/issue1556-fetch-and-build.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +DIR=$(dirname "${BASH_SOURCE[0]}") + +. "$DIR"/common.sh + +dub remove main-package --non-interactive --version=* 2>/dev/null || true +dub remove dependency-package --non-interactive --version=* 2>/dev/null || true + + +echo "Trying to fetch fs-sdl-dubpackage" +"$DUB" --cache=local fetch main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs + +echo "Trying to build it (should fetch dependency-package)" +"$DUB" --cache=local build main-package --skip-registry=all --registry=file://"$DIR"/issue1556-fetch-and-build-pkgs +