Improve error message when attempting to refreseh a local snap

Bug #2038709 reported by Alex Lowe
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Medium
Unassigned

Bug Description

This was originally reported in snapcraft by ~sed-i. I'm moving this over as it's about the snap cli.

https://github.com/snapcore/snapcraft/issues/4190

### What needs to get done

I have a snap installed from a local file
```
$ which obsidian
/snap/bin/obsidian
```
Now I see it in the store
```
$ snap info obsidian
name: obsidian
summary: Obsidian
publisher: –
store-url: https://snapcraft.io/obsidian
license: unset
description: |
  Obsidian
commands:
  - obsidian
refresh-date: 2022-08-02
channels:
  latest/stable: 1.3.5 2023-06-01 (12) 113MB classic
  latest/candidate: ↑
  latest/beta: ↑
  latest/edge: ↑
installed: 0.15.9 (x1) 77MB -
```
But if I try to refresh it I get an obscure error message:
```
$ sudo snap refresh obsidian
error: local snap "obsidian" is unknown to the store, use --amend to proceed anyway
```
I happen to remember I installed it from file, but the error message could be more informative.

### Why it needs to get done

Reduce user confusion around refreshing snaps.

Revision history for this message
Sergio Cazzolato (sergio-j-cazzolato) wrote :

Hi, thanks for raising this.

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.