bump-formula-pr: check for version presence.
If it's not there, error out rather than fetching to avoid creating versionless cache files, which cause `brew cleanup` to crash.
This commit is contained in:
		
							parent
							
								
									d9b4363833
								
							
						
					
					
						commit
						baf7ba6316
					
				@ -174,6 +174,7 @@ module Homebrew
 | 
			
		||||
      rsrc.download_strategy = CurlDownloadStrategy
 | 
			
		||||
      rsrc.owner = Resource.new(formula.name)
 | 
			
		||||
      rsrc.version = forced_version if forced_version
 | 
			
		||||
      odie "No version specified!" unless rsrc.version
 | 
			
		||||
      rsrc_path = rsrc.fetch
 | 
			
		||||
      if Utils.popen_read("/usr/bin/tar", "-tf", rsrc_path) =~ %r{/.*\.}
 | 
			
		||||
        new_hash = rsrc_path.sha256
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user