When using an extension, e.g.
gnome-3-28 it will append the launch scripts to the
command-chain as supplied in
snapcraft.yaml. This is inverse to expectation where we expect that the extension has set the necessary variables before we are handed control. Ideally, the extension should be configurable to specify the order in which we want the scripts to run, but failing that the extension scripts should be placed first.
One scenario where this is a problem is the extension scripts sometimes have trouble doing everything required if the
snapcraft-preload script is in the
command-chain to fix our app’s shared memory usage (for example).