So I heard one can debug snapcraft with
SNAPCRAFT_ENABLE_DEVELOPER_DEBUG, but it would be better if there would be a CLI flag
- It would be documented more obviously, as it would be a CLI flag it would be found in
- Sometimes, like when building via multipass VMs, it might be easier to just append an option instead of setting an environment variable
- It would complement the
The environment variable is incredibly long and hidden as it is meant for snapcraft developers themselves.
The tool is meant for developers, but this environment variable is for developers themselves. If you are not interested in developing for snapcraft itself, may I ask what this provides that would be of interest?
Sometimes snpacraft does weird stuff that may or may not be my fault but it doesn’t tell me.
Recently I had a weird case that my python script was using a
#!/usr/bin/python2..7 header but was meant for python3. Snapcraft did build the snap, but when snapping it failed with an error about a command exiting with code 1.
I added https://github.com/snapcore/snapcraft/pull/2696 locally and realized it had something to do with that.
But if I’d have known about that flag earlier, it might have helped me to debug it.
Anyways, it doesn’t hurt documenting it more closely. What’s the worst that could happen anyways?