File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -148,26 +148,29 @@ ${chalk.grey('——————————————————')}`
148148          process . exit ( 0 ) ; 
149149        } 
150150      }  else  { 
151+         const  skipOption  =  `Don't push` 
151152        const  selectedRemote  =  ( await  select ( { 
152153          message : 'Choose a remote to push to' , 
153-           options : remotes . map ( ( remote )  =>  ( {  value : remote ,  label : remote  } ) ) 
154+           options : [ ... remotes ,   skipOption ] . map ( ( remote )  =>  ( {  value : remote ,  label : remote  } ) ) , 
154155        } ) )  as  string ; 
155156
156157        if  ( isCancel ( selectedRemote ) )  process . exit ( 1 ) ; 
157158
158-         const  pushSpinner  =  spinner ( ) ; 
159- 
160-         pushSpinner . start ( `Running 'git push ${ selectedRemote }  '` ) ; 
161- 
162-         const  {  stdout }  =  await  execa ( 'git' ,  [ 'push' ,  selectedRemote ] ) ; 
163- 
164-         if  ( stdout )  outro ( stdout ) ; 
165- 
166-         pushSpinner . stop ( 
167-           `${ chalk . green (  
168-             '✔'  
169-           ) }   successfully pushed all commits to ${ selectedRemote }  `
170-         ) ; 
159+         if  ( selectedRemote  !==  skipOption )  { 
160+           const  pushSpinner  =  spinner ( ) ; 
161+   
162+           pushSpinner . start ( `Running 'git push ${ selectedRemote }  '` ) ; 
163+   
164+           const  {  stdout }  =  await  execa ( 'git' ,  [ 'push' ,  selectedRemote ] ) ; 
165+   
166+           if  ( stdout )  outro ( stdout ) ; 
167+   
168+           pushSpinner . stop ( 
169+             `${ chalk . green (  
170+               '✔'  
171+             ) }   successfully pushed all commits to ${ selectedRemote }  `
172+           ) ; 
173+         } 
171174      } 
172175    }  else  { 
173176      const  regenerateMessage  =  await  confirm ( { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments