mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
The CommandFromCore helper is currently always looking at the core snap. With the snapd snap we need to refactor it so that it uses the snapd snap if available and just falls back to the core snap. The osutil.CommandFromCore is not in the rightplace and it also does not take the snapd snap into account. This PR moves it to the cmd/cmdutil package (cannot be in cmd because of an import cycle with cmd/snapinfo.go). It also tweaks the arguments slightly (no need to pass the snapMountDir anymore).