mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-07-19 12:25:06 +02:00
Fix Manyfold Ruby setup home initialization
Create the `manyfold` service user before calling `setup_ruby` so `/home/manyfold` exists when rbenv profile snippets are written. Also harden `setup_ruby` by creating `$HOME` if missing, preventing profile-write failures for installers that pass a home directory before creating the user.
This commit is contained in:
@@ -8637,6 +8637,11 @@ setup_ruby() {
|
||||
local BASHRC_FILE="$HOME/.bashrc"
|
||||
local TMP_DIR=$(mktemp -d)
|
||||
|
||||
# Ensure HOME exists: callers may pass a not-yet-created home (e.g. a service
|
||||
# user that is created later in the install), so the profile writes below do
|
||||
# not fail on a missing directory.
|
||||
mkdir -p "$HOME"
|
||||
|
||||
if ! grep -q 'rbenv init' "$PROFILE_FILE" 2>/dev/null; then
|
||||
cat <<'EOF' >>"$PROFILE_FILE"
|
||||
export PATH="$HOME/.rbenv/bin:$PATH"
|
||||
|
||||
Reference in New Issue
Block a user