Skip to content

Commit

Permalink
snap: Add GOCOVERDIR to commands (#15)
Browse files Browse the repository at this point in the history
This PR creates a GOCOVERDIR in the snap confinement space when using
debug binaries.

Note: required for canonical/microcloud#420.
  • Loading branch information
tomponline authored Oct 16, 2024
2 parents 8983a97 + 422af64 commit 1289a99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ MICROCLOUDD="microcloudd"
if [ -x "${SNAP_COMMON}/microcloudd.debug" ]; then
MICROCLOUDD="${SNAP_COMMON}/microcloudd.debug"
echo "==> WARNING: Using a custom debug MicroCloud binary!"
GOCOVERDIR="${SNAP_COMMON}/data/cover"
export GOCOVERDIR
mkdir -p "${GOCOVERDIR}"
fi

exec "${MICROCLOUDD}" --state-dir "${SNAP_COMMON}/state"
3 changes: 3 additions & 0 deletions snapcraft/commands/microcloud
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
MICROCLOUD="microcloud"
if [ -x "${SNAP_COMMON}/microcloud.debug" ]; then
MICROCLOUD="${SNAP_COMMON}/microcloud.debug"
GOCOVERDIR="${SNAP_COMMON}/data/cover"
export GOCOVERDIR
mkdir -p "${GOCOVERDIR}"
fi

exec "${MICROCLOUD}" --state-dir "${SNAP_COMMON}/state" "$@"

0 comments on commit 1289a99

Please sign in to comment.