We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67650c8 commit 38100f8Copy full SHA for 38100f8
jsonexpr/src/main.cpp
@@ -34,8 +34,11 @@ int main(int argc, const char* argv[]) {
34
for (const auto& [key, value] : data.items()) {
35
vars[key] = value;
36
}
37
- } else {
+ } else if (argc == 2) {
38
expression = argv[1];
39
+ } else {
40
+ std::cerr << "error: no expression provided" << std::endl;
41
+ return 1;
42
43
44
const auto result = jsonexpr::evaluate(expression, vars, funcs);
0 commit comments