private validateParameters()

in src/commands/orgs/collaborators/update.ts [192:228]


  private validateParameters() {
    if (
      !(
        this.collaboratorsToAdd ||
        this.collaboratorsToAddFile ||
        this.collaboratorsToDelete ||
        this.collaboratorsToDeleteFile ||
        this.collaboratorsToMakeAdmins ||
        this.collaboratorsToMakeAdminsFile ||
        this.adminsToMakeCollaborators ||
        this.adminsToMakeCollaboratorsFile
      )
    ) {
      throw failure(ErrorCodes.InvalidParameter, "nothing to update");
    }
    if (this.collaboratorsToAdd && this.collaboratorsToAddFile) {
      throw failure(
        ErrorCodes.InvalidParameter,
        "parameters '--add-collaborators' and '--add-collaborators-file' are mutually exclusive"
      );
    }
    if (this.collaboratorsToDelete && this.collaboratorsToDeleteFile) {
      throw failure(
        ErrorCodes.InvalidParameter,
        "parameters '--delete-collaborators' and '--delete-collaborators-file' are mutually exclusive"
      );
    }
    if (this.collaboratorsToMakeAdmins && this.collaboratorsToMakeAdminsFile) {
      throw failure(ErrorCodes.InvalidParameter, "parameters '--make-admins' and '--make-admins-file' are mutually exclusive");
    }
    if (this.adminsToMakeCollaborators && this.adminsToMakeCollaboratorsFile) {
      throw failure(
        ErrorCodes.InvalidParameter,
        "parameters '--make-collaborators' and '--make-collaborators-file' are mutually exclusive"
      );
    }
  }