tomSecretsDistributionApp function

String tomSecretsDistributionApp(
  1. String serviceDirectory, {
  2. required String operatingSystem,
})

The app of the distribution around a service whose executable is in serviceDirectory (…/tsm/bin): the path its executable has when the service is the distribution's, which the service admits as an admin besides tsm and the app beside itself.

Implementation

String tomSecretsDistributionApp(
  String serviceDirectory, {
  required String operatingSystem,
}) {
  final windows = operatingSystem == 'windows';
  final sep = windows ? r'\' : '/';
  final exe = '$tomSecretsAppExecutable${windows ? '.exe' : ''}';
  return operatingSystem == 'macos'
      ? _join([serviceDirectory, '..', '..', '..', 'MacOS', exe], sep)
      : _join([serviceDirectory, '..', '..', exe], sep);
}