An automotive vehicle has a passenger cabin, an HVAC system adjustable between a fresh air mode and a recirculate mode, a compartment containing a heat-producing electrical component, and a non-passenger compartment that is ventilated to outside of the vehicle. A duct has an inlet end adjacent the compartment and an outlet end adjacent an air intake of the HVAC system. A valve controls whether cooling air exiting the compartment is directed into the duct or into the non-passenger compartment. The valve is operated to direct a majority of the cooling air into the duct when the HVAC system is in the recirculate mode, and into the non-passenger compartment when the HVAC system is in the fresh air mode. Air from the non-passenger compartment may be vented out of the vehicle through an air extractor vent.