exec method

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

Execute a command in the root of this workspace.

Implementation

Future<int> exec(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: path,
    onlyOutputOnError: onlyOutputOnError,
  );
}