resolveControllerLaunch function
Implementation
ControllerLaunchCommand resolveControllerLaunch({
String? resolvedExecutable,
Uri? scriptUri,
}) {
final executable = resolvedExecutable ?? Platform.resolvedExecutable;
if (isDartVmExecutable(executable)) {
final localController = _findLocalControllerEntrypoint(
scriptUri: scriptUri ?? Platform.script,
);
if (localController != null) {
return ControllerLaunchCommand(
executable,
[localController],
);
}
return const ControllerLaunchCommand('fdb-controller', []);
}
if (isStandaloneFdbExecutable(executable)) {
return ControllerLaunchCommand(
executable,
const [internalControllerFlag],
);
}
return const ControllerLaunchCommand('fdb-controller', []);
}