Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b347e8c

Browse files
committed
up: update the execAndPrint() error output style
1 parent 3d5c546 commit b347e8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/Cmd/AbstractCmdBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ protected function execAndPrint(string $command, string $workDir): void
183183
[$exitCode, $lastLine] = Exec::system($command, $workDir);
184184

185185
$this->code = $exitCode;
186-
$this->output = trim($lastLine);
186+
$this->output = $msg = trim($lastLine);
187187

188188
if ($exitCode !== 0) {
189189
$this->error = $this->output;
190-
$this->printMessage("errorcode $exitCode:\n" . $lastLine, self::PRINT_ERROR);
190+
$this->printMessage("error: exit code $exitCode" . ($msg ? "\n$msg" : ''), self::PRINT_ERROR);
191191
} else {
192192
echo "\n";
193193
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /