[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread John Lenton
Em dashes cannot be part of a snap name.
They _could_ be part of an intentional 'snap set' command, something like
   snap set mysnap foo=—o—
in which case, if the "snap set" fails, the user will get the above message, 
followed by whatever error. Like so:

$ snap set bofh foo=—o—
Your command included some characters that look like dashes but are not:
"snap set bofh foo=\u2014o\u2014"
in some situations you might find that when copying from an online source such
as a blog you need to replace “typographic” dashes and quotes with their ASCII
equivalent.  Dashes in particular are homoglyphs on most terminals and in most
fixed-width fonts, so it can be hard to tell.

error: cannot perform the following tasks:
- Run configure hook of "bofh" snap (snap "bofh" has no "configure" hook)


I think this is reasonable unless we want to actually parse the em dashes, 
which seems like a lot more work for this corner case.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread Seth Arnold
On Tue, Jul 17, 2018 at 02:39:22PM -, John Lenton wrote:
> $ snap install ––help
> Your command included some characters that look like dashes but are not:
> "snap install \u2013\u2013help"

What happens if en or em dashes are used as part of a snap name? Are they
allowed characters or forbidden? Could there be commands that "look" safe
but in reality operate on pacakges with funny names?

Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread John Lenton
For reference:

$ snap install ––help
Your command included some characters that look like dashes but are not:
"snap install \u2013\u2013help"
in some situations you might find that when copying from an online source such
as a blog you need to replace “typographic” dashes and quotes with their ASCII
equivalent.  Dashes in particular are homoglyphs on most terminals and in most
fixed-width fonts, so it can be hard to tell.

error: snap "––help" not found
$

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread John Lenton
I've added code to check for typographical dashes and warn the user:
https://github.com/snapcore/snapd/pull/5524

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread John Lenton
Yep! reproduced it:

$ snap install atom –classic
error: store.SnapNotFound with 2 snaps


that _is_ a terrible error.

** Changed in: snapd (Ubuntu)
   Status: New => Confirmed

** Changed in: snapd (Ubuntu)
 Assignee: (unassigned) => John Lenton (chipaca)

** Changed in: snapd (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread Marian Gasparovic
Here is the list of all snap install commands, it was 58/60 which failed
with that error

   41  sudo snap install slack
   42  sudo snap install slack --classic
   43  sudo snap install irccloud-desktop
   44  sudo snap install atom
   45  sudo snap install atom --classic
   56  sudo snap install firefox 
   57  sudo snap install chromium 
   58  sudo snap install atom –classic 
   60  sudo snap install atom –-classic 
   61  sudo snap install vlc

Whoa, found it... in 60, those -- characters are not the same, first '-'
is not '-', it was copy/paste and that is some strange character

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1782110] Re: unhelpful error message when snap is installed already

2018-07-17 Thread John Lenton
There's something very strange going on.

This is what I get:

$ snap install atom --classic
atom 1.28.2 from 'snapcrafters' installed
$ snap install atom --classic
snap "atom" is already installed, see 'snap help refresh'
$ 

the 'already installed' error is returned before even looking at the
store; there's just no way to get to that error just like this.

Can you reproduce this? How?

If not, could you get us the output of 'snap tasks' for the change in
question? (look at 'snap changes' to figure out which one it is).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782110

Title:
  unhelpful error message when snap is installed already

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1782110/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs