Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Fix ov corepack and pdm existence issues (#4472)
sarayourfriendf262be526cb4
diff --git a/docker/dev_env/run.sh b/docker/dev_env/run.shindex c4a087aca..666d7bfe1 100755--- a/docker/dev_env/run.sh+++ b/docker/dev_env/run.sh@@ -49,26 +49,30 @@ darwin*);;esac-host_pnpm_store="$(pnpm store path 2>/dev/null || echo)"+if command -v pnpm &>/dev/null; then+ host_pnpm_store="$(pnpm store path)"-# Share the pnpm cache with the container, if it's available locally-if [ "$host_pnpm_store" != "" ]; then- pnpm_home="$(dirname "$host_pnpm_store")"- run_args+=(- --env PNPM_HOME="$pnpm_home"- -v "$pnpm_home:$pnpm_home:rw,z"- )+ # Share the pnpm cache with the container, if it's available locally+ if [ "$host_pnpm_store" != "" ]; then+ pnpm_home="$(dirname "$host_pnpm_store")"+ run_args+=(+ --env PNPM_HOME="$pnpm_home"+ -v "$pnpm_home:$pnpm_home:rw,z"+ )+ fifi-# Share the PDM cache with the container, if it's available locally-# --quiet so PDM doesn't repeatedly fill the console with update messages-# if they're enabled-if [ "$(pdm config --quiet install.cache)" == "True" ]; then- host_pdm_cache="$(pdm config --quiet cache_dir)"- run_args+=(- --env "PDM_CACHE_DIR=$host_pdm_cache"- -v "$host_pdm_cache:$host_pdm_cache:rw,z"- )+if command -v pdm &>/dev/null; then+ # Share the PDM cache with the container, if it's available locally+ # --quiet so PDM doesn't repeatedly fill the console with update messages+ # if they're enabled+ if [ "$(pdm config --quiet install.cache)" == "True" ]; then+ host_pdm_cache="$(pdm config --quiet cache_dir)"+ run_args+=(+ --env "PDM_CACHE_DIR=$host_pdm_cache"+ -v "$host_pdm_cache:$host_pdm_cache:rw,z"+ )+ fifidocker run "${run_args[@]}" openverse-dev-env:latest "$@"