Skip to content

Commit

Permalink
fix: docker image not installing module dependencies for yarn4 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 2, 2024
1 parent df19408 commit c1fcd3a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -e

# Install dependencies for all local dev modules

export COREPACK_ENABLE_DOWNLOAD_PROMPT=0

if [ -d /app/module-local-dev ]; then
echo "Installing dependencies for all local dev modules..."
for module in $(ls /app/module-local-dev/); do
Expand All @@ -11,7 +13,13 @@ if [ -d /app/module-local-dev ]; then
echo "Skipping installation of module $module dependencies, to force, remove its node_modules directory"
else
echo "Installing dependencies for module $module"
yarn install --prod

YARN_VERSION=$(yarn -v)
if [[ $YARN_VERSION == "1.*" ]] ; then
yarn install --prod
else
yarn workspaces focus --production
fi
fi
done
fi
Expand Down

0 comments on commit c1fcd3a

Please sign in to comment.