dw-0 / kiauh

Klipper Installation And Update Helper
GNU General Public License v3.0
3.4k stars 491 forks source link

fix: always use system home directory #303

Closed pedrolamas closed 1 year ago

pedrolamas commented 1 year ago

My understanding from the usage of \/home\/${USER} around the scripts is to ensure that / is escaped to \/, but that makes the assumption that ${HOME} is the same as \home\${USER}.

Knowing that we can use ${HOME//pattern/replacement} we should be able to escape any / to \/ by using ${HOME//\//\\/}.

This change makes it possible to use Kiauh directly on a docker container with no "\home" folder.