Skip to content

Commit

Permalink
entrypoint: ignore node warning about cjs require
Browse files Browse the repository at this point in the history
* node-v24 this might not be needed
  see nodejs/node#55417
  • Loading branch information
p1100i committed Nov 20, 2024
1 parent 14dd192 commit 02ab13b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ fi

project_command="cd ${project_dir};"

#
# npm emits warning cauze it uses experimental nodejs feature
# see https://github.com/nodejs/node/issues/55417
#
# With node-v24 this might not be needed
#
npm_command="NODE_OPTIONS=--disable-warning=ExperimentalWarning npm"

if [ -z "${SKIP_NPM_INSTALL:-}" ]; then
project_command="${project_command} npm install;"
project_command="${project_command} ${npm_command} install;"
fi

project_command="${project_command} npm test;"
project_command="${project_command} ${npm_command} test;"

su - "${project_user}" -c "${project_command}"

0 comments on commit 02ab13b

Please sign in to comment.