sibprogrammer / xq

Command-line XML and HTML beautifier and content extractor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad xpath argument causes nil dereference

gharris1727 opened this issue · comments

Problem Statement

Command-line arguments can be creatively malformed by new users (me!) and provide unhelpful error messages sometimes.
I was exploring the concat feature and happened to trigger this crash.

Steps to Reproduce

$ echo "" | xq -x '('

Actual Result

XPath error: runtime error: invalid memory address or nil pointer dereference

Expected Result

Some sort of syntax error, maybe pointing to the bad character