Files
codeql-action/scripts/check-node-modules.sh
Michael B. Gale 455038c8a7 Add script to check whether npm i needs to be run
and add it to the `build` command
2025-09-25 14:45:55 +01:00

8 lines
187 B
Bash
Executable File

#!/bin/bash
set -e
# Check if npm install is likely needed before proceeding
if [ ! -d node_modules ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then
npm install
fi