Skip to content

Commit

Permalink
snapcraft/commands/lxc: reuse var for LXD_CONF dir handling
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
(cherry picked from commit d7b61f4)
  • Loading branch information
simondeziel authored and tomponline committed Nov 7, 2024
1 parent e296652 commit 1b3b6c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions snapcraft/commands/lxc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ if [ ! -d "${SNAP_USER_COMMON}/config" ]; then
if [ -d "${SNAP_REAL_HOME}/.config/lxc" ]; then
cp -r "${SNAP_REAL_HOME}/.config/lxc" "${SNAP_USER_COMMON}/config" || true
fi

mkdir -p "${SNAP_USER_COMMON}/config"
fi

# Set the environment
Expand All @@ -30,6 +28,7 @@ if [ -z "${LXD_DIR:-""}" ]; then
fi

export LXD_CONF="${SNAP_USER_COMMON}/config"
[ -d "${LXD_CONF}" ] || mkdir -p "${LXD_CONF}"
export LXD_GLOBAL_CONF="${LXD_GLOBAL_CONF:-"${SNAP_COMMON}/global-conf/"}"

# Use editor wrapper
Expand Down

0 comments on commit 1b3b6c1

Please sign in to comment.