Bug 1780712

Summary: Warning: /var/lib/snapd/snap/bin was not found in your $PATH
Product: [Fedora] Fedora Reporter: iolo
Component: snapdAssignee: Zygmunt Krynicki <me>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: go-sig, me, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-09 09:02:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description iolo 2019-12-06 17:09:30 UTC
Description of problem:
When installing snap packages, a warning is printed saying that "/var/lib/snapd/snap/bin was not found in your $PATH" despite the fact that that directory actually is in my $PATH.

Version-Release number of selected component (if applicable):
snapd-2.42.2-1.fc31.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install a package using snap, i.e. issue the command "sudo snap install <package name>"


Actual results:
The aforementioned warning message is printed after the installation finishes.

Expected results:
No warning should be printed, given that the directory mentioned in the warning definitely is in my $PATH.

Additional info:

Comment 1 Neal Gompa 2019-12-07 02:24:12 UTC
After snapd is installed, the /var/lib/snapd/snap/bin directory should be added to the PATH the next time you login. Have you done that yet before trying this?

Comment 2 iolo 2019-12-07 15:43:16 UTC
Yes I have. The issue persists even after multiple reboots even though, as I said, that directory definitely is in my PATH. I can even run snap-installed programs just fine. The warning seems to be erroneous.

Comment 3 Neal Gompa 2019-12-09 09:02:37 UTC
This is an issue with how sudo works. The environment gets reset under sudo and the PATH is hardcoded.

*** This bug has been marked as a duplicate of bug 1691996 ***