punimtag/viewer-frontend/scripts/with-sharp-libpath.sh
Tanya 60b6d1df91
Some checks failed
CI / skip-ci-check (pull_request) Successful in 1m35s
CI / lint-and-type-check (pull_request) Failing after 2m14s
CI / python-lint (pull_request) Failing after 1m57s
CI / test-backend (pull_request) Successful in 3m42s
CI / build (pull_request) Successful in 4m42s
CI / secret-scanning (pull_request) Successful in 1m42s
CI / dependency-scan (pull_request) Successful in 1m42s
CI / sast-scan (pull_request) Successful in 2m45s
CI / workflow-summary (pull_request) Failing after 1m33s
chore: Add blank lines to improve readability in multiple files
This commit adds blank lines to the end of several files, including configuration files and scripts, enhancing the overall readability and maintainability of the codebase. Consistent formatting practices contribute to a cleaner and more organized project structure.
2026-01-12 13:26:43 -05:00

21 lines
602 B
Bash
Executable File

#!/bin/bash
# Helper script to set LD_LIBRARY_PATH for Sharp before running commands
# This ensures Sharp can find its bundled libvips library
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
SHARP_LIB_PATH="$PROJECT_DIR/node_modules/sharp/node_modules/@img/sharp-libvips-linux-x64/lib"
if [ -d "$SHARP_LIB_PATH" ]; then
export LD_LIBRARY_PATH="$SHARP_LIB_PATH:${LD_LIBRARY_PATH:-}"
exec "$@"
else
echo "Warning: Sharp libvips library not found at $SHARP_LIB_PATH"
echo "Sharp image processing may not work correctly."
exec "$@"
fi