Use $HOME rather than /home/pi
install.sh assumes that the old default username of pi is in use. Now that OctoPi is in the Raspberry Pi Imager, it's fairly likely that the username will be customized, and install.sh will prompt with "Neither /home/pi/OctoPrint/venv nor /home/pi/oprint can be found."
Using $HOME instead of hard-coding /home/pi fixes this.
There's an issue with the changes to the script. Though you're using the $HOME for all the hardcoded paths, for the changes to the sudoers file, you're still using "pi". In the context of changing to using $HOME, this is wrong. You should also use $USER.
Thank you both!
Due to an issue with the CI actions that was recently resolved, this PR needs a quick sync with upstream. Could you merge the latest upstream branch real quick?
This has been included in #4784!