File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ .  " $( dirname -- " $0 " ) " 
3+ 
14echo  " 🔍 Running automatic fixes before pushing..." 
2- # Use npx to ensure pnpm is found, or use the full path
3- npx pnpm fix
5+ 
6+ #  Try multiple ways to run pnpm
7+ if  command  -v pnpm > /dev/null 2>&1 ;  then 
8+   #  Direct pnpm if available in PATH
9+   pnpm fix
10+ elif  [ -f  " $( npm root -g) " ;  then 
11+   #  Try global NPM installation path
12+   " $( npm root -g) " 
13+ elif  command  -v npx > /dev/null 2>&1 ;  then 
14+   #  Fallback to npx if available
15+   npx --no-install pnpm fix
16+ else 
17+   echo  " ⚠️ Could not find pnpm. Skipping automatic fixes..." 
18+   exit  0  #  Don't fail the push, just continue
19+ fi 
420
521#  Check if there are any changes after running fixes
622if  [ -n  " $( git status --porcelain) " ;  then 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments