RecipeCommand mistakenly tries to apply a recipe even if you don't give it a valid directory

Created on 14 May 2024, about 1 month ago
Updated 8 June 2024, 19 days ago

Problem/Motivation

RecipeCommand does this:

    $recipe_path = $input->getArgument('path');
    if (!is_string($recipe_path) || !is_dir($recipe_path)) {
      $io->error(sprintf('The supplied path %s is not a directory', $recipe_path));
    }

Good on it for validating that it was actually given a directory!

The problem is that...it outputs the error, then continues executing! This leads to buggy behavior.

Steps to reproduce

Run core/scripts/drupal recipe and pass it an invalid directory. You'll get an error, but it'll also probably give you other bizarre errors.

Proposed resolution

We should return a non-zero error code immediately after flagging the error.

πŸ› Bug report
Status

Fixed

Version

10.3 ✨

Component
BaseΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024