/snap/bin not on hook environment $PATH

Bug #1662856 reported by Stuart Bishop
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
New
Undecided
Unassigned

Bug Description

/snap/bin is not in the hook environment's $PATH, despite the snapd package being installed and having created /etc/profile.d/apps-bin-path.sh. The problem persists after a reboot, which indicates that the hook environment's $PATH is independent from the system $PATH. Either the hook environment should use the system path, or /snap/bin should be added to the hook environment $PATH.

$ juju --version
2.0.2-xenial-amd64

$ juju run --unit=postgresql/16 'echo $PATH'
/var/lib/juju/tools/unit-postgresql-16:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ juju ssh postgresql/16
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.8.0-34-generic x86_64)

 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

7 packages can be updated.
2 updates are security updates.

Last login: Wed Feb 8 10:36:33 2017 from 10.0.4.1
ubuntu@juju-e5c017-25:~$ sudo -s -H

root@juju-e5c017-25:/home/ubuntu# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

root@juju-e5c017-25:/home/ubuntu# cat /etc/profile.d/apps-bin-path.sh
# Expand the $PATH to include /snap/bin which is what snappy applications
# use
PATH=$PATH:/snap/bin

Revision history for this message
Anastasia (anastasia-macmood) wrote :

This is related to, if not a duplicate of, bug # 1660273.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.