Trying to snap a directory that doesn't exist prints [Errno 2]

Bug #1604385 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Triaged
Undecided
Unassigned

Bug Description

To reproduce:

$ snapcraft snap idontexist
[Errno 2] No such file or directory: '/tmp/test/idontexist/meta/snap.yaml'

It shouldn't show Errno 2.

Tags: bitesize
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Leo, are you saying the error should look like this?

$ snapcraft snap idontexist
No such file or directory: '/tmp/test/idontexist/meta/snap.yaml'

If not, could you be more specific?

Leo Arias (elopio)
tags: added: bitesize
Revision history for this message
Leo Arias (elopio) wrote :

we still need to define all the error messages that we want to show, but yes, something like that.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

I have mixed feelings about this one. This isn't a snapcraft-specific error, it's a FileNotFoundError.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Rather than just removing the errno, I say we check to see if the file exists, and then show a snapcraft-specific error. First, if the directory doesn't exist, say so. Then, if the meta/snap.yaml file doesn't exist, say something like "this directory is missing snap metadata" or something similar.

Changed in snapcraft:
status: New → Triaged
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.