Unwanted line-end characters in .info.yml can break DRUPAL_PROJECTS_PATH

Migrated issue

Reported by: valic

Related to !409 (merged)

Problem/Motivation

During building $DRUPAL_PROJECTS_PATH for testing if is not specified, the build env is getting extra space if the .info.yml contains hidden special characters as carriage-return character

character

Based of slack discussion https://drupal.slack.com/archives/C223PR743/p1758966832712479 with @fjgarlin the problem is in
https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.main.yml?ref_type=heads#L78-81

Steps to reproduce

Run Drupal CI with file containing special character

Example
Have character: https://git.drupalcode.org/project/geoip/-/blob/3.0.x/geoip.info.yml?ref_type=heads

Successful run of CI: https://git.drupalcode.org/project/geoip/-/pipelines/310181

Failed run of same file: https://git.drupalcode.org/project/geoip/-/pipelines/610389

Does not have: https://git.drupalcode.org/project/geoip/-/blob/3.x/geoip.info.yml?ref_type=heads

Proposed resolution

Run sed at the end of command to remove any non letter/numeric character

Remaining tasks

User interface changes

API changes

Data model changes