From 7e5c57a848d02be61d29e473d61f33d15d08e7da Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Wed, 22 Jan 2025 07:38:41 +0200 Subject: [PATCH] Only export XDG_CONFIG_HOME and XDG_DATA_HOME if they aren't already set --- snap/local/launcher | 11 +++++++++-- 1 file 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