Skip to content

Commit 4bc87f2

Browse files
committed
conditional pipefail
1 parent 336cfaa commit 4bc87f2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ollama_bash_lib.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
OLLAMA_LIB_NAME='Ollama Bash Lib'
7-
OLLAMA_LIB_VERSION='0.45.11'
7+
OLLAMA_LIB_VERSION='0.45.12'
88
OLLAMA_LIB_URL='https://github.com/attogram/ollama-bash-lib'
99
OLLAMA_LIB_DISCORD='https://discord.gg/BGQJCbYVBa'
1010
OLLAMA_LIB_LICENSE='MIT'
@@ -20,7 +20,10 @@ OLLAMA_LIB_STREAM=0 # Streaming mode: 0 = No streaming, 1 = Yes streaming
2020
OLLAMA_LIB_THINKING="${OLLAMA_LIB_THINKING:-off}" # Thinking mode: off, on, hide
2121
OLLAMA_LIB_TIMEOUT="${OLLAMA_LIB_TIMEOUT:-300}" # Curl timeout in seconds
2222

23-
set -o pipefail # Exit the pipeline if any command fails (instead of only the last one)
23+
if (set -o pipefail 2>/dev/null); then # If pipefail is supported
24+
set -o pipefail # Exit the pipeline if any command fails (instead of only the last one)
25+
fi
26+
2427

2528
# Internal Functions
2629

0 commit comments

Comments
 (0)