File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/contentstack-clone/src/lib/util Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -141,24 +141,22 @@ class CloneHandler {
141141 management_token : config . management_token ,
142142 } ) ;
143143
144- if ( ! config . sourceStackBranch && config . sourceStackBranchAlias ) {
145- await this . resolveBranchAliases ( true ) ;
146- return resolve ( ) ;
147- }
148144 // NOTE validate if source branch is exist
149145 if ( isSource && config . sourceStackBranch ) {
150146 await this . validateIfBranchExist ( stackAPIClient , true ) ;
151147 return resolve ( ) ;
152- }
153-
154- if ( ! config . targetStackBranch && config . targetStackBranchAlias ) {
155- await this . resolveBranchAliases ( ) ;
148+ } else if ( isSource && config . sourceStackBranchAlias ) {
149+ await this . resolveBranchAliases ( true ) ;
156150 return resolve ( ) ;
157151 }
152+
158153 // NOTE Validate target branch is exist
159154 if ( ! isSource && config . targetStackBranch ) {
160155 await this . validateIfBranchExist ( stackAPIClient , false ) ;
161156 return resolve ( ) ;
157+ } else if ( ! isSource && config . targetStackBranchAlias ) {
158+ await this . resolveBranchAliases ( ) ;
159+ return resolve ( ) ;
162160 }
163161 spinner = ora ( 'Fetching Branches' ) . start ( ) ;
164162 const result = await stackAPIClient
You can’t perform that action at this time.
0 commit comments