fix: always use system home directory #303

Merged
pedrolamas merged 1 commits from pedrolamas/fix-home into master 2023-02-28 15:30:42 +01:00
pedrolamas commented 2023-02-28 14:41:03 +01:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.