snap info <snap> fails from within a dir that has a sub-dir named "<snap>", if <snap> is not installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Initial state (lxd not installed):
free@x1:~$ snap list
Name Version Rev Tracking Publisher Notes
core 16-2.40 7396 stable canonical✓ core
core18 20190723 1074 stable canonical✓ base
gnome-3-26-1604 3.26.0.20190705 90 stable/… canonical✓ -
gnome-3-28-1804 3.28.0-
gnome-calculator 3.32.1 406 stable/… canonical✓ -
gnome-characters v3.32.1+
gnome-logs 3.32.0-
gnome-system-
gtk-common-themes 0.1-22-gab0a26b 1313 stable/… canonical✓ -
free@x1:~$ mkdir lxd
free@x1:~$ snap info lxd
error: no snap found for "lxd/"
free@x1:~$ rmdir lxd
free@x1:~$ snap info lxd
name: lxd
summary: System container manager and API
publisher: Canonical✓
contact: https:/
license: Apache-2.0
[...]
Right, we give preference to local path if it exists (a directory, which is a valid snap container, or .snap file) and attempt to print local info from its snap.yaml, but do not fall back to asking the store if this fails. I'm not sure if we want to change that, but we will definitely consider this, thanks for the report.