On Mon, Jan 18, 2021 at 11:40:19AM +0800, Lin Jiaxin wrote:
Determine whether to return the error line or error messages by the value of eturn_error_line
i ^--- => return_error_line ?
Thanks, Liushaofei
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
lib/error_messages.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/error_messages.rb b/lib/error_messages.rb index 3e1564b..d83d890 100644 --- a/lib/error_messages.rb +++ b/lib/error_messages.rb @@ -40,12 +40,12 @@ class ErrorMessages return @error_messages end
- def obtain_error_messages_by_error_id(error_id)
- def obtain_error_messages_by_error_id(error_id, return_error_line = false) error_messages_by_error_id = [] error_messages = obtain_error_messages error_messages.each do |k, v| if ('build-pkg.' + build_pkg_error_id(k)) == error_id
error_messages_by_error_id += v.to_a
end error_messages_by_error_iderror_messages_by_error_id += return_error_line ? [k] : v.to_a end
-- 2.23.0