fix: resolve 'chain' binary on PATH (legacy 'fai' fallback)

Studio's Start-hub looked for 'fai' on PATH; post-rename the entry
binary is 'chain', so a fresh install failed to start the daemon.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-06-19 16:33:54 +02:00
parent bb4d055a45
commit d66f46f133

View file

@ -242,7 +242,10 @@ class SystemActions {
}
final isWindows = Platform.isWindows;
final fromPath = _whichFai(isWindows ? 'fai.exe' : 'fai');
// Post-rename the entry-point binary on PATH is `chain`; still
// accept a legacy `fai` for installs that predate the rename.
final fromPath = _whichFai(isWindows ? 'chain.exe' : 'chain') ??
_whichFai(isWindows ? 'fai.exe' : 'fai');
if (fromPath != null) return fromPath;
final home = Platform.environment[isWindows ? 'USERPROFILE' : 'HOME'];