diff options
| author | sigoden <sigoden@gmail.com> | 2024-11-16 11:09:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-16 11:09:40 +0800 |
| commit | 86aa9106090a0219bac30bc12f5a5bd91949afd9 (patch) | |
| tree | 69aef8c03242c67480c4edfe42a2cbf4c785b466 /tools/search_wikipedia.sh | |
| parent | 6d30c22b82a5ac1a5775d8137c3b08a581770273 (diff) | |
| download | llm-functions-docker-86aa9106090a0219bac30bc12f5a5bd91949afd9.tar.gz | |
refactor: improve bash code (#125)
* refactor: extract guard_path to utils/guard_path.sh
* add utils/guard_operation.sh
Diffstat (limited to 'tools/search_wikipedia.sh')
| -rwxr-xr-x | tools/search_wikipedia.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/search_wikipedia.sh b/tools/search_wikipedia.sh index 0bf791e..6c7010d 100755 --- a/tools/search_wikipedia.sh +++ b/tools/search_wikipedia.sh @@ -17,7 +17,7 @@ main() { title="$(echo "$json" | jq -r '.query.search[0].title // empty')" pageid="$(echo "$json" | jq -r '.query.search[0].pageid // empty')" if [[ -z "$title" || -z "$pageid" ]]; then - echo "Error: No results found for '$argc_query'" + echo "error: no results for '$argc_query'" >&2 exit 1 fi title="$(echo "$title" | tr ' ' '_')" |
