main: restrict epoch to only numbers
This commit is contained in:
		
							parent
							
								
									55eb636e24
								
							
						
					
					
						commit
						1db5ce66c0
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								main.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -32,7 +32,7 @@ async function main() {
 | 
			
		|||
 | 
			
		||||
        const file = path.join(sourceDirectory, "debian/changelog")
 | 
			
		||||
        const changelog = await firstline(file)
 | 
			
		||||
        const regex = /^(?<package>.+) \((?<epoch>[^:-]+)?:?(?<version>[^:-]+)-?(?<revision>[^:-]+)?\) (?<distribution>.+);/
 | 
			
		||||
        const regex = /^(?<package>.+) \((?<epoch>[0-9]+)?:?(?<version>[^:-]+)-?(?<revision>[^:-]+)?\) (?<distribution>.+);/
 | 
			
		||||
        const match = changelog.match(regex)
 | 
			
		||||
        const { package, epoch, version, revision, distribution } = match.groups
 | 
			
		||||
        const os = await getOS(getDistribution(distribution))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue