diff --git a/config/files/usr/bin/podman-host b/config/files/usr/bin/podman-host new file mode 100755 index 0000000000..6f124922f8 --- /dev/null +++ b/config/files/usr/bin/podman-host @@ -0,0 +1,14 @@ +#!/bin/bash +set -x + +# This little workaround is used to ensure +# we use our $USER inside the containers, without +# resorting to creating devcontainer.json or similar stuff +arr=("$@") +for i in "${!arr[@]}"; do + if [[ ${arr[$i]} == *"root:root"* ]]; then + arr[$i]="$(echo "${arr[$i]}" | sed "s|root:root|$USER:$USER|g")" + fi +done + +flatpak-spawn --host podman "${arr[@]}"