Page MenuHomeSolus

/snap/bin appears twice in the PATH
Closed, ResolvedPublic

Description

I know Solus loves snaps now, but don't give them too much love, heh ?

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/snap/bin:/snap/bin

Event Timeline

kyrios123 edited projects, added Plumbing; removed Lacks Project.Aug 20 2017, 3:07 PM
$ echo $PATH
/bin:/usr/bin:/usr/local/bin:/snap/bin:/snap/bin:/snap/bin

Not as much as I do...and mine are in the wrong order as well :/

AvdN added a subscriber: AvdN.Aug 28 2017, 1:01 PM

I was not sure if /usr/share/defaults/etc/profile.d/70-snapd.sh is always run with bash, so I replaced the first export line in that script with:

if [ -n "$BASH_VERSION" ]; then
    if [[ ":$PATH:" != *":/snap/bin:"* ]] ; then
        export PATH="$PATH:/snap/bin"
    fi
else
    export PATH="$PATH:/snap/bin"
fi

The extra : in the test are to make sure things match if at the beginning/end position of $PATH as well.

mati865 added a subscriber: mati865.Aug 7 2018, 2:08 PM

Seems fine now:

$ echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/snap/bin
DataDrake closed this task as Resolved.Oct 8 2018, 11:36 AM
DataDrake claimed this task.