Here’s another sign the SolarCity plant will prove a huge boondoggle: It turns out the state quietly made it easier for the company to walk away if it can’t turn a profit.

The Investigative Post reports that, after covering $750 million of the plant’s cost, the state two years ago agreed to revised terms to allow SolarCity to give up on it should federal, state or local regulatory or policy changes hurt the business.

The recently opened factory now employs a skeleton crew rattling around the 1.2 million-square-foot plant — because the residential solar market is in decline.

An Obama-era federal tax credit on solar panels is set to shrink in 2020 and sunset in 2022. Team Trump is likely to kill other pro-solar subsidies — and states across the country are rethinking their own gifts to the industry.

If Tesla (which had to buy SolarCity to save it from bankruptcy) does walk away, New York taxpayers will be stuck with an empty custom-built factory, plus custom manufacturing equipment bought with public money.

So SolarCity looks less and less viable in the near future — and unlikely to yield the hundreds of permanent jobs once promised.

In theory, Tesla must pay annual penalties of $41.2 million for 10 years if it walks away — but that no-longer-secret escape hatch virtually guarantees it won’t have to.

Count it as another black mark on Gov. Andrew Cuomo’s scandal-plagued Buffalo Billion scheme.