Skip to content

Commit 9e2f066

Browse files
committed
Add PHP_EOL for better message output
1 parent b4d1f13 commit 9e2f066

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

phpctags

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,13 @@ if (isset($options['help'])) {
100100
echo PHP_EOL;
101101
echo PHP_EOL;
102102
echo $options_info;
103+
echo PHP_EOL;
103104
exit;
104105
}
105106

106107
if (isset($options['version'])) {
107108
echo $version;
109+
echo PHP_EOL;
108110
exit;
109111
}
110112

@@ -158,7 +160,7 @@ if (isset($options['sort'])) {
158160
} else if ($options['sort'] == 'foldcase') {
159161
$options['sort'] = 'foldcase';
160162
} else {
161-
die('phpctags: Invalid value for "sort" option');
163+
die('phpctags: Invalid value for "sort" option'.PHP_EOL);
162164
}
163165
// option -n is equivalent to --sort=no
164166
} else if (isset($options['u'])) {
@@ -180,15 +182,15 @@ if (isset($options['append'])) {
180182
if ($options['append'] === FALSE || yes_or_no($options['append']) == 'yes') {
181183
$options['a'] = FALSE;
182184
} else if (yes_or_no($options['append']) != 'no') {
183-
die('phpctags: Invalid value for "append" option');
185+
die('phpctags: Invalid value for "append" option'.PHP_EOL);
184186
}
185187
}
186188

187189
if (isset($options['recurse'])) {
188190
if ($options['recurse'] === FALSE || yes_or_no($options['recurse']) == 'yes') {
189191
$options['R'] = FALSE;
190192
} else if (yes_or_no($options['recurse']) != 'no') {
191-
die('phpctags: Invalid value for "recurse" option');
193+
die('phpctags: Invalid value for "recurse" option'.PHP_EOL);
192194
}
193195
}
194196

@@ -202,7 +204,7 @@ try {
202204
$ctags->addFiles($argv);
203205
$result = $ctags->export();
204206
} catch (Exception $e) {
205-
die("phpctags: {$e->getMessage()}");
207+
die("phpctags: {$e->getMessage()}".PHP_EOL);
206208
}
207209

208210
// write to a specified file

0 commit comments

Comments
 (0)