Skip to content

Commit

Permalink
Define HOME variable inside konnector jail (#4470)
Browse files Browse the repository at this point in the history
Some node modules as indirect dependencies rely on HOME variable to be
set.

If HOME env variable is not set, the konnector fail with the following
message:

```
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_homedir returned ENOENT (no such file or directory)
```

Defining this variable make the konnector happy
  • Loading branch information
nono authored Sep 30, 2024
2 parents 6cbe0e4 + eba2a03 commit 0015a4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/konnector-nsjail-node-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ nsjail \
-E "COZY_JOB_MANUAL_EXECUTION=${COZY_JOB_MANUAL_EXECUTION}" \
-E "COZY_TIME_LIMIT=${COZY_TIME_LIMIT}" \
-E "COZY_TRIGGER_ID=${COZY_TRIGGER_ID}" \
-E "HOME=/usr/src/konnector" \
-R "${rundir}:/usr/src/konnector/" \
-R /lib \
-R /lib64 \
Expand Down Expand Up @@ -194,5 +195,6 @@ nsjail \
# -E "COZY_CREDENTIALS=${COZY_CREDENTIALS}" \
# -E "COZY_JOB_MANUAL_EXECUTION=${COZY_JOB_MANUAL_EXECUTION}" \
# -E "COZY_LOCALE=${COZY_LOCALE}" \
# -E "HOME=/usr/src/konnector" \
# -R "${rundir}:/usr/src/konnector/" \
# -- /usr/bin/nodejs ${NODE_OPTS} "${runfile}"

0 comments on commit 0015a4e

Please sign in to comment.