Disallow file separator in version strings.
This commit is contained in:
		
							parent
							
								
									e84e4b5566
								
							
						
					
					
						commit
						2c6516ef59
					
				@ -60,6 +60,7 @@ module Hbc
 | 
			
		||||
    def check_version
 | 
			
		||||
      return unless cask.version
 | 
			
		||||
      check_no_string_version_latest
 | 
			
		||||
      check_no_file_separator_in_version
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def check_no_string_version_latest
 | 
			
		||||
@ -68,6 +69,13 @@ module Hbc
 | 
			
		||||
      add_error "you should use version :latest instead of version 'latest'"
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def check_no_file_separator_in_version
 | 
			
		||||
      odebug "Verifying version does not contain '#{File::SEPARATOR}'"
 | 
			
		||||
      return unless cask.version.raw_version.is_a?(String)
 | 
			
		||||
      return unless cask.version.raw_version.include?(File::SEPARATOR)
 | 
			
		||||
      add_error "version should not contain '#{File::SEPARATOR}'"
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def check_sha256
 | 
			
		||||
      return unless cask.sha256
 | 
			
		||||
      check_sha256_no_check_if_latest
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user