Washington (CNN) On the eve of a deadline to avoid a second partial government shutdown , no one -- not congressional leaders, President Donald Trump's allies on Capitol Hill nor his own staff -- is ready to say that he is willing to sign a compromise immigration bill.

But his labored efforts to spin a win out of a nearly two-month confrontation with Democrats -- that brought his border wall no closer -- leave little doubt about the victors from the first big showdown in the new era of divided government.

Two sources told CNN's Dana Bash on Wednesday that the President will sign the bill, reflecting the fact that it is likely the best he can get out of Congress and the political perils of triggering another shutdown.

"We're going to look at the legislation when it comes, and I'll make a determination then," Trump told reporters in the Oval Office.

Votes are expected in the House and the Senate as early as Thursday evening in order to get the legislation to the President's desk -- and ensure relief for 800,000 federal workers living in fear of another shutdown.

Yet Trump, who has a flair for cliffhangers and believes behaving unpredictably keeps everyone else off balance, has yet to give full public assurance he will sign the measure, which falls well short of his demand for $5.7 billion in border wall funding.

That may be why Democrats apparently chose not to take a victory lap after depriving Trump of funding for his top campaign promise and Republicans gingerly expressed hopes the President would sign the legislation.

Everyone is right to be cautious since the President has a record of changing his mind about apparently squared away congressional deals. On the most notorious occasion, he torpedoed a stopgap funding bill in December that lacked wall funding but would have staved off a shutdown that turned into the longest in US history.

House Speaker Nancy Pelosi expressed optimism Wednesday when CNN's Manu Raju asked her whether she believes Trump will sign.

"I think he will," she said.

But no one thinks Trump will just give up the fight even if he signs a bill that includes nearly $1.4 billion for border barriers but no money for the wall he once said Mexico would finance.

Trump has hinted that if he signs the measure, he will take executive action and possibly even declare a national emergency to reprogram money from other government accounts -- likely triggering a constitutional showdown and legal challenges over the extent of presidential powers.

"I don't want to see a shutdown. A shutdown would be a terrible thing," Trump said. "We have options that most people don't really understand."

No one will say

But whether through prudence, political strategy or recognition of the President's sometimes capricious political temperament, his subordinates were unwilling to state definitively that Trump will sign the measure.

Taking their lead from the boss, White House director of strategic communications Mercedes Schlapp and Trump's press secretary, Sarah Sanders, dodged on Wednesday when asked whether Trump would enshrine the bill into law.

"It's hard to say definitively whether or not the President's going to sign it until we know everything that's in it," Sanders said.

Schlapp told CNN: "We are right now at a point where we are going to be reviewing the details and see if the President will move forward and sign it."

One of the potential issues for supporters of the bill is that Trump is highly susceptible to news coverage of his presidency, especially on immigration, the issue that did most to enable his hostile takeover of the GOP.

But even the President's conservative media boosters, whose criticism in December was seen as crucial to him backing out of the previous deal, appear to be offering him political cover as long as he takes executive action.

"I wouldn't be a bit surprised if that's what they're thinking, to declare a national emergency or at least threaten to as part of signing this thing, because the point is gonna be made that this isn't enough," talk radio titan Rush Limbaugh told his listeners on Wednesday.

Another conservative media superstar with Trump's ear, Sean Hannity, said Trump would be within his rights to reject the bill but that a better solution may be to sign it, use the $1.4 billion as a "down payment" on the wall, then tap other government accounts for construction.

"This important third step needs to happen simultaneously," Hannity said Tuesday, using his Fox News show in an extraordinary manner, by drawing out a political play for a sitting commander in chief.

"That would be the President would need to declare a national emergency. This is the time; that is a necessity," Hannity said.

Fights remain

A political and legal fight over the declaration of a state of emergency might not lead to immediate construction on a wall. But it would offer a rallying issue for Trump supporters and allow the President to claim he will not back down.

Expectations that Trump will sign the compromise reflect the unlikelihood of him making any further progress toward funding the wall with Democrats in control of the House.

"This agreement is the last train leaving the station away from another dreaded government shutdown," Senate Minority Leader Chuck Schumer, D-New York, said on Tuesday.

Republican Rep. Kay Granger of Texas, who was on the committee that came up with the compromise bill, said she and colleagues on Capitol Hill had no assurances from the White House that the President would sign on.

But she told CNN's Kate Bolduan: "I am certainly hoping he will sign the bill after it has passed."

Perhaps seeking to stamp out assessments that he had lost the shutdown fight -- over a wall that polls show most Americans oppose and don't think was worth shuttering the federal government over -- Trump turned into his own cheerleader.

"The wall is very, very on its way. It's happening as we speak. We're building, as we speak, in the most desperately needed areas," Trump told a conference of sheriffs in Washington.

"It's a big wall. It's a strong wall. It's a wall the people aren't going through very easy. You're going to have to be in extremely good shape to get over this one. They would be able to climb Mount Everest a lot easier, I think," he added.

While repair work on existing barriers authorized by Congress has been taking place, there is no sign that construction on the kind of wall that Trump was boasting about is under way.

The President also sought to expand his argument, first expressed at a campaign rally on Monday night in Texas, that the shutdown that ended when he folded his cards last month after 35 days had been a success for him.

"I think a point was made with the last shutdown; people realized how bad the border is, how unsafe the border is. And I think a lot of good points were made," Trump said.