agentSdkServerSourceCandidates function

List<String> agentSdkServerSourceCandidates({
  1. required String executableDir,
})

Every folder the server's source — the three files an install starts from — is looked for in, in order.

The packaged layout first and the source checkout second, so a shipped app never installs from a developer's working tree that happens to sit above it on disk.

Implementation

List<String> agentSdkServerSourceCandidates({required String executableDir}) {
  final sep = Platform.pathSeparator;
  return <String>[
    '$executableDir$sep$agentSdkServerPayloadDir',
    for (final script in _sourceCandidates(agentSdkServerScriptName, sep))
      File(script).parent.path,
  ];
}