Skip to content

Commit 27fbc0e

Browse files
Merge pull request #978 from yasinBursali/fix/sigpipe-find-head
fix(shell): replace find|head with find -print -quit
2 parents 33334f6 + e9a9b72 commit 27fbc0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dream-server/installers/lib/detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fix_nvidia_secure_boot() {
390390
fi
391391
done
392392
if [[ -z "$sign_file" ]]; then
393-
sign_file=$(find /usr/src /usr/lib -name sign-file -executable 2>/dev/null | head -1)
393+
sign_file=$(find /usr/src /usr/lib -name sign-file -executable -print -quit 2>/dev/null)
394394
fi
395395
if [[ -z "$sign_file" ]]; then
396396
ai_bad "Cannot find kernel sign-file tool."

dream-server/installers/macos/install-macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ else
609609
fi
610610

611611
# Find llama-server binary (may be in a subdirectory)
612-
FOUND_BIN=$(find "$TEMP_EXTRACT" -name "llama-server" -type f | head -1)
612+
FOUND_BIN=$(find "$TEMP_EXTRACT" -name "llama-server" -type f -print -quit)
613613
if [[ -n "$FOUND_BIN" ]]; then
614614
cp "$FOUND_BIN" "$LLAMA_SERVER_BIN"
615615
chmod +x "$LLAMA_SERVER_BIN"

0 commit comments

Comments
 (0)