summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2025-01-22 07:38:41 +0200
committerMitchell Hashimoto <m@mitchellh.com>2025-02-15 07:06:40 -0800
commit7e5c57a848d02be61d29e473d61f33d15d08e7da (patch)
treee6f57559ceb60aacacfd05bdbc11f41ae37b6443 /snap
parent5841a4f95857c83cf383cf353e253f1b1941dacc (diff)
Only export XDG_CONFIG_HOME and XDG_DATA_HOME if they aren't already set
Diffstat (limited to 'snap')
-rwxr-xr-xsnap/local/launcher11
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