From e94e7538ef55be365f9d8f0057dfb6492d0198a3 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 31 May 2023 09:20:21 +0100 Subject: [PATCH] fix: when resolving dependencies the branch attribute should be preferred when resolving package version dependencies the branch attribute of the dependency should be used to select the package version, not the branch name in parameter unless dependency doesn't specify a branch. --- src/package/packageVersionCreate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package/packageVersionCreate.ts b/src/package/packageVersionCreate.ts index e07f2a885..5d78c94f5 100644 --- a/src/package/packageVersionCreate.ts +++ b/src/package/packageVersionCreate.ts @@ -166,7 +166,7 @@ export class PackageVersionCreate { const buildNumber = versionNumber.build; // use the dependency.branch if present otherwise use the branch of the version being created - const branch = dependency.branch === '' ? dependency.branch : this.options.branch; + const branch = dependency.branch === '' ? this.options.branch : dependency.branch; const branchString = !branch || branch === '' ? 'null' : `'${branch}'`; // resolve a build number keyword to an actual number, if needed