Fran Garcia-Linares commented on merge request !407 at project / gitlab_templates

Fran Garcia-Linares
2025-09-15T10:37:12Z

I kind of prefer the check for the folder instead of variables. The idea was that if we call this and node_modules is not present, then it will be, no matter what else.

I don't think that we need the checks at all if we keep the line below:

      [[ $_COMPOSER_YARN_INSTALL == "1" ]] && cd $_WEB_ROOT/core && corepack enable && yarn install

So, I'd probably undo the previous commit and then keep both lines like this:

    # Install node modules if requested on the composer step.
    - |
      [[ $_COMPOSER_YARN_INSTALL == "1" ]] && cd $_WEB_ROOT/core && corepack enable && yarn install
    # Ensure that the folder is there and display the node, npm and yarn versions.
    - *get-node-modules