The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6505

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 1ef3b26abdd8320dc64b96affefbd73ca56b46b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 25 Nov 2019 13:41:44 -0500
Subject: [PATCH] lxd-agent: Put /snap/bin in PATH
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd-agent/exec.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd-agent/exec.go b/lxd-agent/exec.go
index 3ec7e0ffe9..2908882d2f 100644
--- a/lxd-agent/exec.go
+++ b/lxd-agent/exec.go
@@ -56,6 +56,10 @@ func execPost(d *Daemon, r *http.Request) response.Response {
                env["PATH"] = 
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        }
 
+       if shared.PathExists("/snap/bin") {
+               env["PATH"] = fmt.Sprintf("%s:/snap/bin", env["PATH"])
+       }
+
        // If running as root, set some env variables
        if post.User == 0 {
                // Set default value for HOME
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to