While working on classic confinement snap I was exploring setting various ENV vars (basically to cajol the snap’s commands to use bundled python as opposed to the host systems python). I had success with a wrapper script but I saw references to using “environment:” in snapcraft.yam here
And there is a more specific thread here
and indeed doing something like
solves my problem without managing a custom wrapper script (which is nice). I am a bit worried as i cannot find a reference to “environment:” looking here https://docs.snapcraft.io/build-snaps/syntax. Is “environment:” legit, worried it might be deprecated or not fully supported. So asking is using environment: block in a snapcraft.yaml a robust solution?