@Simon: I'm not sure what the plan is, but I don't believe it passes anything extra at the moment. You could work around this by utilizing snapctl. For example, at the beginning of the hook, check `snapctl get installed`. If it's true, move on, but if it's false, run your initial install operations. Then set `snapctl set installed=true`.
You could do something similar with upgrades, save $SNAP_VERSION via `snapctl set version=$SNAP_VERSION` and then compare it to $SNAP_VERSION each time to determine if you're on a new version.
@Christian yes, hooks have the same environment and confinement as apps. Indeed, perhaps this should be documented more explicitly, thank you for the feedback.
@Simon: I'm not sure what the plan is, but I don't believe it passes anything extra at the moment. You could work around this by utilizing snapctl. For example, at the beginning of the hook, check `snapctl get installed`. If it's true, move on, but if it's false, run your initial install operations. Then set `snapctl set installed=true`.
You could do something similar with upgrades, save $SNAP_VERSION via `snapctl set version= $SNAP_VERSION` and then compare it to $SNAP_VERSION each time to determine if you're on a new version.
@Christian yes, hooks have the same environment and confinement as apps. Indeed, perhaps this should be documented more explicitly, thank you for the feedback.