runTask(name, options) {
    if (this._currentTask) {
      throw new Error(`Concurrent tasks are not supported`);
    }

    logger.info(`\`${this.name}\` command running \`${name}\` task`);

    let Task = this.tasks[name];
    if (!Task) {
      throw new Error(`Unknown task "${name}"`);
    }

    let task = new Task(this._env(name));

    this._currentTask = task;

    return Promise.resolve()
      .then(() => task.run(options))
      .catch((error) => {
        logger.info(`An error occurred running \`${name}\` from the \`${this.name}\` command.`, error.stack);

        throw error;
      })
      .finally(() => {
        delete this._currentTask;
      });
  }
Looks up for the task and runs
It also keeps the reference for the current active task
Keeping reference for the current task allows to cleanup task on interruption

@private
@method runTask
@throws {Error} when no task found
@throws {Error} on attempt to run concurrent task
@param {string} name Task name from the tasks registry. Should be capitalized
@param {object} options
@return {Promise} Task run