I currently have the following apps stanza in my Snapcraft project file:
apps:
vt-cli: &vt-app-defs
command: bin/vt
command-chain:
- bin/snap-maintenance-launcher.sh
completer: etc/bash_completion.d/vt
plugs:
- home
- removable-media
- network
vt: *vt-app-defs
However, when I tried to differentiate the two in the snap runtime in a launcher script, I found nothing in the environment that makes this possible(the first argument of the launcher script is always $SNAP/bin/vt
, and nothing in the environment variables hints at the actual app name being triggered.
Can we introduce another environment variable (e.g., SNAP_APP_NAME
) to tell us just that?