SAN FRANCISCO — Larry Baer was at a lunch on the final day of spring training when he got a text from Brian Sabean. Madison Bumgarner had fractured his pinky and would miss extended time, Sabean told him.

That’s enough to make any executive lose his appetite, but a few days later, Baer watched with pride as the Giants — behind Joe Panik — swiped a couple of games from the Dodgers in their season-opening series in Los Angeles. Baer, the team’s president and CEO, liked the fight he saw right off the bat. Four months later, he feels the same way.

“The vital signs are good,” Baer said over the weekend. “We haven’t had injuries derail us in terms of the energy. Would we have won a few more games without the injuries? Probably, but we can’t use injuries as an excuse. What I like is the resilience. I think everybody looks at the resilience of the team.”

Baer spoke as he watched the Giants take batting practice on Saturday afternoon. They showed resilience later that night by forcing extra innings, and they did the same Sunday. Ultimately, though, the Giants lost both games, dropping to 51-50. With just over a week until Major League Baseball’s trade deadline, that leaves the front office in an odd spot.

Should they buy, adding pieces to a club that withstood all those first-half injuries and remains just five games out of the division lead?

Or should they sell a few veterans for prospects, breaking up a club that has shown no ability to play consistent baseball or stray too far north of .500?

Baer eliminated one possibility.

“Selling is just something that hasn’t been done by us, so I don’t foresee it,” he said.

That’s not to say the Giants will be buying, either. The likelihood at this point is that the Giants will mostly stay put, because even if they wanted to add — and we’ll get to some desires in a second — there simply isn’t room. The Giants have spent nine months trying to stay under the competitive balance tax and a recent trade told you all you need to know. The front office attached a decent pitching prospect to Austin Jackson and Cory Gearrin just to dip back under the tax line of $197 million.

“We’ve had more than our share of injuries and that ultimately impacts our CBT,” general manager Bobby Evans said at the time.

The Giants have already put five players on the 60-day DL this season, and adding five additional players to the 40-man roster added up. So, too, did the salaries of the players replacing the likes of Bumgarner, Mark Melancon and Johnny Cueto on the active roster. It may not seem like a big deal to pay a reliever the minimum for a few weeks, but all those additional days changed the math for a front office that prepared for injuries, but not this many.

Take the Cueto injury, for example. That locked Andrew Suarez into the rotation (which has worked out well) where the Giants are paying him the MLB minimum ($545,000) instead of his minor league salary, which would not have counted against the CBT. The Giants added Jose Valdez to the 40-man roster, and even though he was only up for 12 days and likely made the minimum, that’s still nearly two weeks where they were paying Cueto and Valdez.

It’s a drop in the bucket in the big picture, but when you’re counting every dollar to avoid the tax, the injuries add up, $10,000 or $20,000 at a time. There’s another factor, too, that fans and reporters often miss this time of year. Some reported salaries are a bit off the actual number (for example, Derek Holland is listed at $1.75 million but is actually making $2 million), meaning the Giants are operating with less breathing room than most have assumed.

The payroll was actually over the CBT line before the Gearrin and Jackson trade, per sources, and even after that move the Giants are still within a million dollars of hitting that $197 million number. If they go over by even a dollar, they will be immediately hit with a fine said to be about $7 million.

Which leads us back to the deadline. What can the Giants realistically add? Bruce Bochy would like a right-handed bat, preferably one to play in left field. The Giants have a .690 OPS against lefty pitchers and will face a ton of them down the stretch. Evan Longoria will help, but the staff is seeking more. Beyond that, team officials are comfortable with the rotation that now includes Suarez and Dereck Rodriguez, and they believe the bullpen will be deep with the addition of Ray Black and the August return of Hunter Strickland.

There’s a need for one more bat, but it will be a difficult trick to pull off. Evans has proven adept at structuring contracts and getting money back in deals, and he likely will need to spend much of the next week with a calculator. Ownership has repeatedly told Sabean and Evans that they would consider going over the tax for a difference-maker — like a Manny Machado type — but it doesn’t appear that fit is out there at this point.

The Giants are not dipping under the CBT line to save a few million this year. They are doing so for future flexibility. Their tax rate will reset from 50 percent on overages to 20 percent, which would amount to tens of millions if they were to, say, chase a certain home run derby champ this winter. Staying under the tax line will also have other roster-building implications, including increased international spending and a much higher compensatory draft pick if they put the qualifying offer on a player like Andrew McCutchen. The benefits are there, which is why the Yankees and Dodgers have joined the Giants in staying under this season. Only two teams -- the Red Sox and Nationals -- are projected over the tax.

This all leaves the Giants with little space to maneuver. They can try to add a minor reinforcement without going over a tax line that is less than a million away, or they can add a bigger piece and convince the other team to take on some modest payroll in a deal (think: Dyson, Sam). This team won’t be selling over the next eight days, but when you take a deep dive into the numbers, it becomes clear how difficult it will be to be buyers.