Donald Trump speaks during a cabinet meeting in the White House in Washington, DC

Donald Trump isn't showing his hand yet. But with little Washington appetite for another shutdown, he's expected to grudgingly accept an agreement that would keep the government open but provide just a fraction of the money he's been demanding for his Mexican border wall.

Addressing the deal on Wednesday, Mr Trump said he would be taking “a very serious look” at the text when the White House receives it from Congress. Lawmakers on Capitol Hill were still haggling over final details, but they appeared on track to finish soon.

“We're going to look at the legislation when it comes and I'll make a determination,” the president said, telling reporters he'd be looking out for any “land mines.”

Still, he reiterated his aversion to another shutdown, the likely result if he rejects the agreement, saying one would be “a terrible thing.”

White House officials cautioned on Wednesday that they have yet to receive full legislative language. And Mr Trump has a history of suddenly balking at deals after signaling he would sign them. But barring any major changes, he is expected to sign the deal currently expected to go to a vote at some point before Friday.

Mr Trump and his aides have also signalled that he is preparing to use executive action to try to secure additional funding for the wall by shifting federal dollars without congressional sign-off.

Accepting the deal, worked out by congressional negotiators from both parties, would be a disappointment for a president who has repeatedly insisted he needs $5.7bn (£4.4bn) for a barrier along the U.S.-Mexico border and painted the project as paramount for national security. Trump turned down a similar deal in December, forcing the 35-day partial shutdown that left hundreds of thousands of federal workers without paychecks and Republicans reeling.

Trump shuts down US government over Mexico border wall – in pictures Show all 15 1 /15 Trump shuts down US government over Mexico border wall – in pictures Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures The US Capitol on the first morning of a partial government shutdown in Washington EPA Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Trump shuts down US government over Mexico border wall – in pictures President Trump speaks with children who called the North American Aerospace Defense Command Santa tracker in the State Dining Room of the White House. He earlier in the day, tweeted that he was 'all alone in the White House' waiting for Democrats to make a deal on border security EPA Trump shuts down US government over Mexico border wall – in pictures Furloughed federal workers pick up free food at a pop-up store of Kraft Heinz Getty Images Trump shuts down US government over Mexico border wall – in pictures Hundreds of federal workers and contractors rally against the partial federal government shutdown Getty Trump shuts down US government over Mexico border wall – in pictures A pedestrian walk past the U.S. Capitol ahead of a possible partial government shut down in Washington, U.S., December 20, 2018. REUTERS/Joshua Roberts JOSHUA ROBERTS Reuters Trump shuts down US government over Mexico border wall – in pictures From left, House Majority Leader Steny Hoyer, Senate Minority Leader Chuck Schumer, Sen. Dick Durbin and Speaker of the House Nancy Pelosi walk to speak to reporters after meeting with President Donald Trump about border security in the Situation Room of the White House. Trump declared he could keep parts of the government shut down for "months or even years" as he and Democratic leaders failed in a second closed-door meeting to resolve his demand for billions of dollars for a border wall with Mexico Evan Vucci AP Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures A sign alerts visitors to the closure of the National Archives on the fifth day of a partial government shutdown EPA Trump shuts down US government over Mexico border wall – in pictures Hundreds of federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures Visitors read signs announcing the closure of the White House Visitor Center EPA Trump shuts down US government over Mexico border wall – in pictures President Donald Trump speaks during a round-table discussion on border security and safe communities with State, local, and community leaders in the Cabinet Room of the White House Getty Images Trump shuts down US government over Mexico border wall – in pictures A sign alerts visitors to the closure of the White House Visitor Center on the first day of a partial government shutdown EPA Trump shuts down US government over Mexico border wall – in pictures Furloughed federal workers show their IDs for entering a pop-up store of Kraft Heinz Getty Images

Lawmakers tentatively agreed to a deal that would provide nearly $1.4bn (£1bn) for border barriers and keep the government funded for the rest of the fiscal year, which ends on 30 September. Filling in the details has taken some time, as is typical, and aides reported Wednesday that the measure had hit some snags, though they doubted they would prove fatal.

Last-minute hang-ups include whether to include a simple extension of the Violence Against Women Act as Senate Republicans want or move a new, longer-term bill separately, as House Speaker Nancy Pelosi is pushing.

Democrats are also pressing to try to make sure employees of federal contractors receive back pay for wages lost during the last shutdown. The continued haggling means that a House vote can't come before Thursday night, at the earliest.

Given the back-and-forth, Press Secretary Sarah Sanders told reporters the president was awaiting a final version before making a final call.

“We want to see the final piece of legislation, and we'll make a determination at that point,” she said Wednesday.

Reporting by AP. View The Independent’s live coverage of the looming shutdown from Wednesday below.