Skip to content

Commit

Permalink
Prefer user who initiated install before (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-jokic committed Mar 10, 2022
1 parent ad0d0c4 commit 29cee52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Misc/layoutbin/darwin.svc.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function install()
mkdir -p "${log_path}" || failed "failed to create ${log_path}"

echo Creating ${PLIST_PATH}
sed "s/{{User}}/${SUDO_USER:-$USER}/g; s/{{SvcName}}/$SVC_NAME/g; s@{{RunnerRoot}}@${RUNNER_ROOT}@g; s@{{UserHome}}@$HOME@g;" "${TEMPLATE_PATH}" > "${TEMP_PATH}" || failed "failed to create replacement temp file"
sed "s/{{User}}/${USER:-$SUDO_USER}/g; s/{{SvcName}}/$SVC_NAME/g; s@{{RunnerRoot}}@${RUNNER_ROOT}@g; s@{{UserHome}}@$HOME@g;" "${TEMPLATE_PATH}" > "${TEMP_PATH}" || failed "failed to create replacement temp file"
mv "${TEMP_PATH}" "${PLIST_PATH}" || failed "failed to copy plist"

# Since we started with sudo, runsvc.sh will be owned by root. Change this to current login user.
Expand Down

0 comments on commit 29cee52

Please sign in to comment.