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 = {
    EnvironmentVariableKey.melosRootPath: path,
    if (sdkPath != null) EnvironmentVariableKey.melosSdkPath: sdkPath!,
    if (childProcessPath != null)
      EnvironmentVariableKey.path: childProcessPath!,
  };

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