fix: trim branch name before comparing to master (#19853)
This commit is contained in:
		
					parent
					
						
							
								d258797d05
							
						
					
				
			
			
				commit
				
					
						f10f44acf5
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -49,7 +49,7 @@ async function getCurrentBranch (gitDir) {
 | 
			
		|||
      '--remote'
 | 
			
		||||
    ], gitDir)).split('\n')
 | 
			
		||||
 | 
			
		||||
    branch = branches.filter(b => b === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
 | 
			
		||||
    branch = branches.filter(b => b.trim() === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
 | 
			
		||||
    if (!branch) {
 | 
			
		||||
      console.log(`${fail} no release branch exists for this ref`)
 | 
			
		||||
      process.exit(1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue