execInMelosToolPath method

Future<int> execInMelosToolPath(
  1. List<String> execArgs, {
  2. bool onlyOutputOnError = false,
})

Execute a command in the melos_tool directory of this workspace.

Implementation

Future<int> execInMelosToolPath(
  List<String> execArgs, {
  bool onlyOutputOnError = false,
}) {
  final environment = {
    'MELOS_ROOT_PATH': path,
    if (sdkPath != null) utils.envKeyMelosSdkPath: sdkPath!,
    if (childProcessPath != null) 'PATH': childProcessPath!,
  };

  return utils.startCommand(
    execArgs,
    logger: logger,
    environment: environment,
    workingDirectory: melosToolPath,
    onlyOutputOnError: onlyOutputOnError,
  );
}