File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/contentstack-branches/src Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ export default class MergeHandler {
108108 deleted : [ ] ,
109109 } ;
110110 const selectedItems = await selectCustomPreferences ( module , this . branchCompareData [ module ] ) ;
111+ if ( ! selectedItems . length ) {
112+ cliux . print ( chalk . red ( 'No items were selected' ) ) ;
113+ process . exit ( 1 ) ;
114+ }
111115 forEach ( selectedItems , ( item ) => {
112116 this . mergeSettings . mergeContent [ module ] [ item . status ] . push ( item . value ) ;
113117 this . mergeSettings . itemMergeStrategies . push ( item . value ) ;
Original file line number Diff line number Diff line change @@ -202,11 +202,15 @@ function printCompactTextView(branchTextRes: BranchCompactTextRes): void {
202202 } ) ;
203203
204204 forEach ( branchTextRes . modified , ( diff : BranchDiffRes ) => {
205- cliux . print ( chalk . blue ( `± '${ diff . title } ' ${ startCase ( camelCase ( diff . type ) ) } ` ) ) ;
205+ if ( diff . merge_strategy !== 'ignore' ) {
206+ cliux . print ( chalk . blue ( `± '${ diff . title } ' ${ startCase ( camelCase ( diff . type ) ) } ` ) ) ;
207+ }
206208 } ) ;
207209
208210 forEach ( branchTextRes . deleted , ( diff : BranchDiffRes ) => {
209- cliux . print ( chalk . red ( `- '${ diff . title } ' ${ startCase ( camelCase ( diff . type ) ) } ` ) ) ;
211+ if ( diff . merge_strategy !== 'ignore' ) {
212+ cliux . print ( chalk . red ( `- '${ diff . title } ' ${ startCase ( camelCase ( diff . type ) ) } ` ) ) ;
213+ }
210214 } ) ;
211215 }
212216}
You can’t perform that action at this time.
0 commit comments