Skip to content

Commit d909352

Browse files
committed
Show error message when executed without a query
1 parent a0941f9 commit d909352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree-query.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ int main(string[] args) {
152152
import std.getopt, std.file, std.stdio;
153153
// Parse arguments
154154
string query;
155-
if (args[1].strip.startsWith("{")) {
155+
if (args.length >= 2 && args[1].strip.startsWith("{")) {
156156
query = args[1];
157157
args = args[2..$];
158158
} else {

0 commit comments

Comments
 (0)