mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 08:27:26 +00:00
Improve error reporting for builtin_test
This commit is contained in:
parent
143ead8d00
commit
0ced7d8e56
1 changed files with 5 additions and 2 deletions
|
@ -379,9 +379,12 @@ namespace test_expressions {
|
||||||
expression *result = parser.parse_expression(0, (unsigned int)args.size());
|
expression *result = parser.parse_expression(0, (unsigned int)args.size());
|
||||||
/* Handle errors */
|
/* Handle errors */
|
||||||
for (size_t i = 0; i < parser.errors.size(); i++) {
|
for (size_t i = 0; i < parser.errors.size(); i++) {
|
||||||
if (i > 0)
|
err.append(L"test: ");
|
||||||
err.push_back(L'\n');
|
|
||||||
err.append(parser.errors.at(i));
|
err.append(parser.errors.at(i));
|
||||||
|
err.push_back(L'\n');
|
||||||
|
|
||||||
|
// For now we only show the first error
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue