Skip to content

Commit 7403ab2

Browse files
mfrischbuttercebe
authored andcommitted
add file path output (#43)
1 parent 5c14197 commit 7403ab2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/php-openapi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ switch ($command) {
130130
}
131131

132132
if (!empty($errors)) {
133-
print_formatted("\BErrors found while reading the API Description:\C\n", STDERR);
133+
if ($inputFile === null) {
134+
print_formatted("\BErrors found while reading the API description from STDIN:\C\n", STDERR);
135+
} else {
136+
print_formatted("\BErrors found while reading the API description from {$inputFile}:\C\n", STDERR);
137+
}
134138
foreach ($errors as $error) {
135139
if (($openPos = strpos($error, '[')) !== false && ($closePos = strpos($error, ']')) !== false && $openPos < $closePos) {
136140
$error = escape_formatted(substr($error, 0, $openPos + 1)) . '\Y'

0 commit comments

Comments
 (0)