FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql-action/scripts/check-node-modules.sh at main · github/codeql-action · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
codeql-action
Public
Notifications
You must be signed in to change notification settings
Fork
488
Star
1.6k
Code
Issues
158
Pull requests
35
Actions
Security and quality
2
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql-action
/
scripts
/
check-node-modules.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
23 lines (20 loc) · 775 Bytes
Breadcrumbs
codeql-action
/
scripts
/
check-node-modules.sh
Copy path
File metadata and controls
executable file
·
23 lines (20 loc) · 775 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!
/bin/bash
set
-e
#
Check if running in GitHub Actions
if
[
"
$GITHUB_ACTIONS
"
=
"
true
"
]
;
then
echo
"
Running in a GitHub Actions workflow; not running 'npm install'
"
exit
0
fi
#
Check if npm install is likely needed before proceeding
if
[
!
-d
node_modules ]
;
then
echo
"
Running 'npm install' because 'node_modules' directory is missing.
"
npm install
elif
[ package.json
-nt
package-lock.json ]
;
then
echo
"
Running 'npm install' because 'package-lock.json' appears to be outdated.
"
npm install
elif
[ package-lock.json
-nt
node_modules/.package-lock.json ]
;
then
echo
"
Running 'npm install' because 'node_modules/.package-lock.json' appears to be outdated.
"
npm install
else
echo
"
Skipping 'npm install' because everything appears to be up-to-date.
"
fi
Back
|
FazBrowse Home
|
New Git URL