Skip to content

Commit

Permalink
fix snap --use-lxd no longer works with sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jun 10, 2020
1 parent 68f809a commit 3bff761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ LXD (`runs-on: ubuntu-latest`) is for now likely the easiest way to get `snapcra
with:
use_lxd: true
- name: Build snap
run: sudo snapcraft --use-lxd # sudo is required for --use-lxd
run: sg lxd -c 'snapcraft --use-lxd'
```

## Development
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const runLinuxInstaller = () => {
run("sudo snap install snapcraft --classic");
if (useLxd) {
run("sudo snap install lxd");
run(`sudo usermod --append --groups lxd ${process.env.USER}`);
}
run(`echo "::add-path::/snap/bin"`); // Add `/snap/bin` to PATH for subsequent actions
run("sudo chown root:root /"); // Fix root ownership
Expand Down

0 comments on commit 3bff761

Please sign in to comment.