From 4558ca2fb10c144e1f7ab380329eb577e12851d3 Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Wed, 16 Sep 2026 21:35:11 +0200 Subject: Make Runtime Dir Creation Linux-Only The `XDG_RUNTIME_DIR` is a Linux-only thing, and there is no established equivalent on macOS, so just don't create the directory. Also cleaned up some "if unset" expansions in the script. --- dbx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dbx b/dbx index 7cb71d4..e226c95 100755 --- a/dbx +++ b/dbx @@ -20,7 +20,9 @@ args=() OS="$(uname -s)" DATADIR="${XDG_DATA_HOME:-$HOME/.local/share}/dbx" CONFIGDIR="${XDG_CONFIG_HOME:-$HOME/.config}/dbx" -RUNTIMEDIR="${XDG_RUNTIME_DIR:-/run/user/$UID}/dbx" +if [ "$OS" = "Linux" ]; then + RUNTIMEDIR="${XDG_RUNTIME_DIR:-/run/user/$UID}/dbx" +fi usage() { cat <