diff options
| author | Carlos Hernandez <carlos@techbyte.ca> | 2020-08-30 17:13:41 +0000 |
|---|---|---|
| committer | Carlos Hernandez <carlos@techbyte.ca> | 2020-08-30 17:13:41 +0000 |
| commit | 65b2fce78765649c64e7b7e0efbc99214fae0805 (patch) | |
| tree | ce7de684a577dd8adad87d50ab5456bd42fb1ac8 /ci | |
| parent | 9c65017c3bfaecf51df5e746074d7ded9f942f05 (diff) | |
| download | rneovim-65b2fce78765649c64e7b7e0efbc99214fae0805.tar.gz rneovim-65b2fce78765649c64e7b7e0efbc99214fae0805.tar.bz2 rneovim-65b2fce78765649c64e7b7e0efbc99214fae0805.zip | |
snap: don't run snapcraft under sudo
Snapcraft 4.0 complains about running LXD builds under sudo. So instead
add the CI user to the "lxd" group and use sg to switch to that
membership.
Resolves: #12712
Diffstat (limited to 'ci')
| -rwxr-xr-x | ci/snap/install.sh | 1 | ||||
| -rwxr-xr-x | ci/snap/script.sh | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ci/snap/install.sh b/ci/snap/install.sh index 23e0bc5eb8..0ceb6f0422 100755 --- a/ci/snap/install.sh +++ b/ci/snap/install.sh @@ -4,6 +4,7 @@ set -e set -o pipefail sudo apt update +sudo usermod -aG lxd $USER sudo /snap/bin/lxd.migrate -yes sudo /snap/bin/lxd waitready sudo /snap/bin/lxd init --auto diff --git a/ci/snap/script.sh b/ci/snap/script.sh index 647cda4874..f0d45fea00 100755 --- a/ci/snap/script.sh +++ b/ci/snap/script.sh @@ -4,5 +4,5 @@ set -e set -o pipefail mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache" -sudo snapcraft --use-lxd +sg lxd -c snapcraft |