| 
									
										
										
										
											2024-08-15 07:59:49 -07:00
										 |  |  | # typed: strict | 
					
						
							| 
									
										
										
										
											2022-11-21 21:04:22 -08:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module Homebrew | 
					
						
							|  |  |  |   class SimulateSystem | 
					
						
							|  |  |  |     class << self | 
					
						
							|  |  |  |       undef simulating_or_running_on_macos? | 
					
						
							|  |  |  |       undef current_os | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       sig { returns(T::Boolean) } | 
					
						
							|  |  |  |       def simulating_or_running_on_macos? | 
					
						
							| 
									
										
										
										
											2023-05-09 02:15:28 +02:00
										 |  |  |         os.blank? || [:macos, *MacOSVersion::SYMBOLS.keys].include?(os) | 
					
						
							| 
									
										
										
										
											2022-11-21 21:04:22 -08:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       sig { returns(Symbol) } | 
					
						
							|  |  |  |       def current_os | 
					
						
							|  |  |  |         os || MacOS.version.to_sym | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |