PITTSBURGH -- Bud Norris is getting comfortable in uncomfortable situations. So are the rest of the suddenly competitive Houston Astros.
Norris (3-1) struck out eight and didn't walk a batter while dropping his ERA to 3.95. His best work came in the sixth when he escaped unscathed after Pittsburgh loaded the bases with no outs on two hits and an error.
Jose Tabata struck out, Nate McLouth popped to second and Andrew McCutchen couldn't check his swing in time on a 2-2 slider as Norris wriggled out of trouble.
|More on Astros-Pirates|
|More MLB Coverage|
"I know even bases loaded, nobody out, I've just got to attack one hitter at a time and stick with [catcher Jason] Castro really well, and I made the pitches and get out of it," Norris said. "It was exciting, and enough for us to hold on."
Brian Bogusevic singled and scored in the second on a double-play grounder to provide all the offense the Astros needed as they improved to 6-1 when Norris starts.
Brett Myers pitched the ninth for his ninth save.
Pittsburgh's James McDonald (2-2) extended his impressive start, giving up just four hits in eight innings while striking out eight and walking two as his ERA dipped to 2.42.
Still, it wasn't enough for the Pirates, who were shut out for the fourth time this season.
"It's part of the game," McDonald said of the lack of run support. "I've been that guy on the mound when I've gotten shelled. ... They did what I asked them for today and played hard behind me."
If not always smartly. Pittsburgh couldn't score following Jose Tabata's leadoff triple in the fourth. McCutchen was caught stealing later in the same inning and pinch-runner Josh Harrison was picked off in the eighth.
"Sometimes you can be overaggressive," Pittsburgh's Neil Walker said. "Sometimes you make a read that's not right and sometimes you look really stupid. Sometimes it's a play that can change the game."
The Astros, who had baseball's worst record last season, have been a modest surprise so far this spring. They are 7-3 in their last 10 games while getting contributions from all over the place.
Bogusevic led off the second with a single and went to third on Chris Johnson's single to right. Bogusevic scored when Justin Maxwell grounded into a double play.
The Astros didn't get a runner to third the rest of the game, but it hardly mattered.
Three relievers did the rest as Houston's bullpen -- which was last in the National League in ERA in 2011 -- continued its stellar performance. Pittsburgh didn't get a runner in scoring position over the final three innings.
"There's a lot of good arms down there, a lot of good guys, a lot of good pitchers," Astros manager Brad Mills said. "They're working well together. There's a lot of confidence from everybody. They're doing a great job."
The Pirates were hoping a nine-game homestand would give them some needed momentum. Instead they're just 3-4 with two games remaining, their loss on Friday night reminiscent of several recent missed opportunities.
"When the game gets hard, it looks more difficult to play than it is," Pittsburgh manager Clint Hurdle said. "Nobody's beaten themselves up more than those guys. We've got to find a way to continue to push through it."
Pittsburgh's final gasp came in the eighth when Rod Barajas led off with a single. He was replaced by Harrison, and Clint Barmes attempted to bunt Harrison to second when things got weird.
Barmes pulled back after squaring around when a pitch from Wilton Lopez got a little too far inside. The ball appeared to bounce off Barmes' bat and roll into foul territory. Because there were two strikes, plate umpire James Hoye declared Barmes out for bunting foul with two strikes.
Hurdle came out to argue, and Barmes was given a second chance.
When Mills asked for an explanation, he was ejected by first base umpire Jim Joyce.
"I was contending that he was still bunting, and the umpires felt he pulled it back -- he pulled it all the way back and he wasn't bunting," Mills said. "Well, obviously we had a disagreement. And that was it."
Mills needn't have worried. Lopez picked off Harrison and retired Barmes as the Pirates went quietly again.
Pittsburgh starting pitcher Jeff Karstens, on the 15-day disabled list with right shoulder inflammation, could begin side sessions in the bullpen next week, though his return is still uncertain. ... The series continues Saturday. J.A. Happ (2-2, 5.24 ERA) starts for the Astros against Charlie Morton (1-3, 4.61). ... The Astros improved to 5-9 on the road. ... Houston infielder Jose Altuve went 0 for 3 with a walk while batting third for the first time in his career. ... After the game, the Pirates acquired 1B-3B Jeff Larish from the Boston Red Sox for cash.