snap info <snap> fails from within a dir that has a sub-dir named "<snap>", if <snap> is not installed

Bug #1840432 reported by Free Ekanayaka
10
This bug affects 2 people
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-10-gaa70833.aa70833 71 stable canonical✓ -
gnome-calculator 3.32.1 406 stable/… canonical✓ -
gnome-characters v3.32.1+git2.3367201 296 stable/… canonical✓ -
gnome-logs 3.32.0-4-ge8f3f37ca8 61 stable/… canonical✓ -
gnome-system-monitor 3.32.1-3-g0ea89b4922 100 stable/… canonical✓ -
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://github.com/lxc/lxd/issues
license: Apache-2.0
[...]

Revision history for this message
Paweł Stołowski (stolowski) wrote :

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.

Changed in snapd:
status: New → Confirmed
importance: Undecided → Medium
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.