From b53e07243223cc381cb7bf6e53bb3fe0918daede Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 9 Jun 2020 10:34:13 -0700 Subject: [PATCH] add user to lxd --- snap/local/build_and_install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snap/local/build_and_install.sh b/snap/local/build_and_install.sh index 090f61992..1241d15f3 100755 --- a/snap/local/build_and_install.sh +++ b/snap/local/build_and_install.sh @@ -6,6 +6,10 @@ if [[ -z "$TRAVIS" ]]; then exit 1 fi +# Add the current user to the lxd group so they can run `snapcraft --use-lxd` +# without sudo since running the command without sudo is required by newer +# versions of snapcraft. +sudo usermod -aG lxd "$USER" sudo /snap/bin/lxd.migrate -yes sudo /snap/bin/lxd waitready sudo /snap/bin/lxd init --auto