Improve error message when attempting to refreseh a local snap
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:/
### 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:/
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.
Hi, thanks for raising this.