mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Prevent multiple overrides
This commit is contained in:
		@@ -79,6 +79,10 @@ module Linguist
 | 
			
		||||
          warn "Extension is missing a '.': #{extension.inspect}"
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        if l = @overrides[extension]
 | 
			
		||||
          raise ArgumentError, "#{extension} is already overridden by #{l.name}"
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        @overrides[extension] = language
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user