starttask: set NODE_OPTIONS instead of env -S

This commit is contained in:
Girish Ramakrishnan
2021-05-14 09:36:00 -07:00
parent 06b7cb962b
commit 88a5526e9b

View File

@@ -48,8 +48,9 @@ if [[ "${ubuntu_version}" == "18.04" ]]; then
fi
# DEBUG has to be hardcoded because it is not set in the tests. --setenv is required for ubuntu 16 (-E does not work)
# NODE_OPTIONS is used because env -S does not work in ubuntu 16/18.
systemd-run --unit "${service_name}" --nice "${nice}" --uid=${id} --gid=${id} ${options} \
--setenv HOME=${HOME} --setenv USER=${SUDO_USER} --setenv DEBUG=box:* --setenv BOX_ENV=${BOX_ENV} --setenv NODE_ENV=production \
--setenv HOME=${HOME} --setenv USER=${SUDO_USER} --setenv DEBUG=box:* --setenv BOX_ENV=${BOX_ENV} --setenv NODE_ENV=production --setenv NODE_OPTIONS=--unhandled-rejections=strict \
"${task_worker}" "${task_id}" "${logfile}"
exit_code=$?