Comment 1 for bug 1746403

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

Thanks for logging the issue, Brett. Unfortunately, for historical reasons, both `<project root>/snapcraft.yaml` and `<project root>/snap/snapcraft.yaml` are valid locations. The problem here is that Snapcraft isn't doing a good job of determining which it actually is. When you run snapcraft from within the snap directory, it thinks it's the former, when it actually needs to be run as the latter. We can do some heuristics to try and reason it out, though: check for the presence of a `hooks` directory, a `gui` directory, a `plugins` directory, etc. (things that typically go in the `snap` dir). If they're found, we can reasonably determine that snapcraft is being run in the wrong area.