validate method

void validate()

Validates the script. Throws a MelosConfigException if the script is invalid.

Implementation

void validate() {
  if (exec != null &&
      run != null &&
      run!.startsWith(_leadingMelosExecRegExp)) {
    throw MelosConfigException(
      'Do not use "melos exec" in "run" when also providing options in '
      '"exec". In this case the script in "run" is already being executed by '
      '"melos exec".\n'
      'For more information, see https://melos.invertase.dev/configuration/scripts#scriptsexec.\n'
      '\n'
      '    run: $run',
    );
  }
}