| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this is a sensible workaround! Where possible, we should try to actually set the right user id and home directory (sbx_user1051), however in cases where we cannot influence the user, it makes sense to have this fallback.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Context
When a container starts with --user=1000:1000, AddUser is never called so there is no /etc/passwd entry. Combined with UnsetLsEnvs stripping HOME, Node's os.homedir() and AWS SDK config loading throw ENOENT.
Changes
EnsureHome() runs once at startup after UnsetLsEnvs. If user.Current() fails (no passwd entry), it sets HOME=/tmp. The normal root-start flow is unaffected.
Testing
See test-homedir.md (will be removed) for a manual end-to-end test using a Node.js 22 function that calls os.homedir() with --user=1000:1000.
Towards DRG-715