Skip to content

Commit 4523f85

Browse files
committed
Fix #1928: Glycin fixes
#1928
1 parent 0bbc99f commit 4523f85

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

build-aux/isolate-test.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,18 @@ mkdir -p "$XDG_CONFIG_HOME"
5858
# export G_DEBUG="fatal-warnings" # Causes persistent SIGTRAP currently.
5959
export G_DEBUG="fatal-critical"
6060

61+
SANDBOX_PATH="${HOME}/bin"
62+
mkdir -p "$SANDBOX_PATH"
63+
64+
# If `bwrap` is installed, symlink it into the sandbox PATH. Used by glycin GdkPixuf.
65+
if command -v bwrap >/dev/null; then
66+
ln -sf "$(command -v bwrap)" "$SANDBOX_PATH/bwrap"
67+
fi
68+
# Take into account system binaries that may be used by glycin
69+
export PATH="$SANDBOX_PATH:/usr/bin:/bin"
70+
6171
echo "Variables in isolated environment:" >&2
62-
env -i G_DEBUG="$G_DEBUG" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- env >&2
72+
env -i PATH="$PATH" G_DEBUG="$G_DEBUG" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- env >&2
6373
echo >&2
6474

65-
env -i G_DEBUG="$G_DEBUG" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- "$@"
75+
env -i PATH="$PATH" G_DEBUG="$G_DEBUG" HOME="$HOME" XDG_CONFIG_HOME="$XDG_CONFIG_HOME" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" dbus-run-session -- "$@"

0 commit comments

Comments
 (0)