What would be the easiest way to check within the app (electron) , if app is running as snap? I tried this
try {
execSync(`snap list ${meta?.name}`,{timeout: 1000, stdio: 'ignore'})
} catch
where meta.name ist the app name, but this returns 126 in the catch() and 127 in env where no snap is installed.
Maybe no good approach.
Which one is better?
Which additional plug would i need?
TIA