diff options
| author | Ken VanDine <ken.vandine@canonical.com> | 2025-01-22 07:38:41 +0200 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-02-15 07:06:40 -0800 |
| commit | 7e5c57a848d02be61d29e473d61f33d15d08e7da (patch) | |
| tree | e6f57559ceb60aacacfd05bdbc11f41ae37b6443 /snap | |
| parent | 5841a4f95857c83cf383cf353e253f1b1941dacc (diff) | |
Only export XDG_CONFIG_HOME and XDG_DATA_HOME if they aren't already set
Diffstat (limited to 'snap')
| -rwxr-xr-x | snap/local/launcher | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/snap/local/launcher b/snap/local/launcher index 7a77d8afc..6b5b69fa6 100755 --- a/snap/local/launcher +++ b/snap/local/launcher @@ -1,8 +1,15 @@ #!/bin/sh set -e -export XDG_CONFIG_HOME="$SNAP_REAL_HOME/.config" -export XDG_DATA_HOME="$SNAP_REAL_HOME/.local/share" +# Set these to reasonable defaults if not already set +if [ -z "$XDG_CONFIG_HOME" ]; then + export XDG_CONFIG_HOME="$SNAP_REAL_HOME/.config" +fi + +if [ -z "$XDG_DATA_HOME" ]; then + export XDG_DATA_HOME="$SNAP_REAL_HOME/.local/share" +fi + export HOME="$SNAP_REAL_HOME" if [ "$SNAP_ARCH" = "amd64" ]; then |
