@@ -156,10 +156,12 @@ if $VNC_MODE; then
156156 > /dev/null
157157
158158 # Install dependencies if needed (node_modules is a Docker volume)
159- if [ ! -f "/app/node_modules/.linux-installed" ]; then
159+ # Compare lockfile hash to detect changes since last install
160+ LOCK_HASH=$(md5sum /app/pnpm-lock.yaml | cut -d' ' -f1)
161+ if [ ! -f "/app/node_modules/.linux-installed" ] || [ "$(cat /app/node_modules/.linux-installed)" != "$LOCK_HASH" ]; then
160162 echo "Installing Linux node_modules..."
161163 pnpm install --frozen-lockfile
162- touch /app/node_modules/.linux-installed
164+ echo "$LOCK_HASH" > /app/node_modules/.linux-installed
163165 fi
164166
165167 echo "Starting Cmdr in dev mode (Vite HMR + Tauri)..."
@@ -218,11 +220,12 @@ docker run --rm \
218220 fi
219221
220222 # Install dependencies if needed (node_modules is a Docker volume)
221- # Check root node_modules marker since that is where pnpm writes the marker
222- if [ ! -f "/app/node_modules/.linux-installed" ]; then
223+ # Compare lockfile hash to detect changes since last install
224+ LOCK_HASH=$(md5sum /app/pnpm-lock.yaml | cut -d' ' -f1)
225+ if [ ! -f "/app/node_modules/.linux-installed" ] || [ "$(cat /app/node_modules/.linux-installed)" != "$LOCK_HASH" ]; then
223226 echo "Installing Linux node_modules..."
224227 pnpm install --frozen-lockfile
225- touch /app/node_modules/.linux-installed
228+ echo "$LOCK_HASH" > /app/node_modules/.linux-installed
226229 fi
227230
228231 echo "Building Tauri app for target: $LINUX_TARGET"
@@ -320,11 +323,12 @@ else
320323 set -e
321324
322325 # Install dependencies if needed (node_modules is a Docker volume)
323- # Check root node_modules marker since that is where pnpm writes the marker
324- if [ ! -f "/app/node_modules/.linux-installed" ]; then
326+ # Compare lockfile hash to detect changes since last install
327+ LOCK_HASH=$(md5sum /app/pnpm-lock.yaml | cut -d' ' -f1)
328+ if [ ! -f "/app/node_modules/.linux-installed" ] || [ "$(cat /app/node_modules/.linux-installed)" != "$LOCK_HASH" ]; then
325329 echo "Installing Linux node_modules..."
326330 pnpm install --frozen-lockfile
327- touch /app/node_modules/.linux-installed
331+ echo "$LOCK_HASH" > /app/node_modules/.linux-installed
328332 fi
329333
330334 # Playwright browsers live in /root/.cache (ephemeral), not in the
0 commit comments