From b1c3772903c9651d65bd22a58cd53822a5ee02de Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 5 Sep 2022 16:04:17 +0100 Subject: [PATCH] Only add snap if snapd exists --- roles/home-cli/files/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 4c29707..cb13d50 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -50,7 +50,7 @@ fi # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for # snappy applications' desktop files. _snap_xdg_path=/var/lib/snapd/desktop -if [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}:*}" ] +if [ -x /usr/lib/snapd/snapd ] && [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}:*}" ] then XDG_DATA_DIRS="${XDG_DATA_DIRS}:${_snap_xdg_path}" fi