detectHomebrew function
Detects if the currently running instance was installed via Homebrew. Checks for Caskroom path specifically to distinguish from npm-global via Homebrew's npm.
Implementation
bool detectHomebrew() {
if (!Platform.isMacOS && !Platform.isLinux) return false;
final execPath = Platform.resolvedExecutable;
return execPath.contains('/Caskroom/');
}