detectDeb function
Detects if installed via a .deb package by querying dpkg.
Implementation
Future<bool> detectDeb() async {
if (!Platform.isLinux) return false;
final osRelease = await getOsRelease();
if (osRelease != null && !isDistroFamily(osRelease, ['debian'])) return false;
final execPath = Platform.resolvedExecutable;
try {
final result = await Process.run('dpkg', ['-S', execPath]);
return result.exitCode == 0 && (result.stdout as String).isNotEmpty;
} catch (_) {
return false;
}
}