Override the BASE_USER for crowsnest install to the current user

The crowsnest installer used `logname` to figure out the current user,
this isn't great since it will return the "original" owner of the login
session, so if you used `sudo` or `su` to become your klipper user .. it
would try to install things into your original user making a bit of a
mess ...
This commit is contained in:
Piotr Banasik
2023-03-18 10:53:40 -07:00
parent ae9e79c579
commit d16a2f26fd

View File

@@ -105,7 +105,7 @@ function install_crowsnest(){
pushd "${HOME}/crowsnest" &> /dev/null || exit 1
title_msg "Installer will prompt you for sudo password!"
status_msg "Launching crowsnest installer ..."
if ! sudo make install; then
if ! sudo make install BASE_USER=$USER; then
error_msg "Something went wrong! Please try again..."
exit 1
fi