engineProbe static method

Future<String> engineProbe()

Verifies the resolved qjs binary by running <bin> -e 'print(1)' and returns a version string (<bin> -v, falling back to the binary path). Throws ExtEngineUnavailableException when the binary is missing or broken. Used by fa ext list.

Implementation

static Future<String> engineProbe() async {
  final bin = resolveBinary();
  final probe = await _runProbe(bin);
  final problem = extProbeProblem(
    bin,
    probe.exitCode,
    probe.stdout,
    probe.stderr,
  );
  if (problem != null) throw ExtEngineUnavailableException(problem);
  return await _engineVersion(bin) ?? bin;
}