Skip to content

Commit 3eb3f67

Browse files
committed
fix(decky): Ensure we retrieve the user's home directory
Each newline in a just recipe instantiates a new shell unless we explicitly define the environment. Similarly, because of this limitation, we need to retrieve the users home directory (since we are executing this recipe with sudo) so that it does not assume that the user is root We will have to do this in the future for other recipes that depend on the environment being preserved. Further, I ran into a limitation where global env variables must be strings/characters. We can not reuse these variables either so they must be declared for each recipe See: https://just.systems/man/en/chapter_44.html
1 parent c5c6f84 commit 3eb3f67

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system_files/deck/usr/share/ublue-os/just/custom.just

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ create-steam-shortcuts:
1515
cp /etc/skel.d/Desktop/Return.desktop ~/Desktop
1616

1717
get-decky:
18+
#!/usr/bin/env bash
19+
export HOME=$(getent passwd ${SUDO_USER:-$USER} | cut -d: -f6)
1820
curl -L https://github.com/SteamDeckHomebrew/decky-installer/releases/latest/download/install_release.sh | sh
1921
sudo chcon -R -t bin_t $HOME/homebrew/services/PluginLoader
2022

0 commit comments

Comments
 (0)