We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6592567 + a0ae9ba commit 94a9b7aCopy full SHA for 94a9b7a
scripts/check-node-modules.sh
@@ -1,7 +1,17 @@
1
#!/bin/bash
2
+
3
set -e
4
5
+# Check if running in GitHub Actions
6
+if [ "$GITHUB_ACTIONS" = "true" ]; then
7
+ echo "Running in a GitHub Actions workflow; not running 'npm install'"
8
+ exit 0
9
+fi
10
11
# Check if npm install is likely needed before proceeding
12
if [ ! -d node_modules ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then
13
+ echo "Running 'npm install' because 'node_modules/.package-lock.json' appears to be outdated..."
14
npm install
15
+else
16
+ echo "Skipping 'npm install' because 'node_modules/.package-lock.json' appears to be up-to-date."
17
fi
0 commit comments