But before they celebrate, they'll need to take a closer look at the ruling, they said.
William Walker, director of Contra Costa Health Services, found that a grandfather clause makes Windmill Farms immune to a law stating the market must be enclosed.
But his ruling also dictates the market will not be able to sell bulk food and cut fruit in the open air, as this opens products up to a high risk of contamination. These products are about 25 percent the family's sales, owners said.
"We're happy we don't have to be enclosed, but we're still working on the bulk food part of it. We're not sure how to interpret that," said Jason Smith, whose family has owned the market for 33 years.
Owners plan to cut and keep melons in a room with four walls, store them in a cooler, and then bring the slices out when customers ask for them, Smith said.
The bulk food - like nuts and candies - on the other hand, are a different story. They are sold in the open air but are kept in plastic covered containers. And the family may have to cut this product out of their sales.
"Yeah, our sales will go down. But at least we won't have to close," Smith said.
Smith also detailed Windmill Farms' sales have gone down about 20 percent since the conflict between the business and the health department began gaining media attention in August.
People have heard it is not a sanitary establishment, but this isn't the case, he said.
County records show the market has had no previous serious health and sanitation violations in the last 20 years.
Earlier this month, supporters of the produce market rallied together at a county health department hearing to explain why the market should not be subject to new regulations.
California Retail Food Code, redrafted last year, states eggs in shells, whole produce and prepackaged foods are the only products that can be sold without a fully enclosed building.