Hide epheremal password from CI logs - #4092
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41cf4af8db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "post-update-cmd": [ | ||
| "Drupal\\Composer\\Composer::generateMetapackages", | ||
| "(chmod a+w sites/default || sudo chmod a+w sites/default) && rm -rf sites/default/files && rm -f sites/default/settings.php && php scripts/erase_drupal_db.php && php core/scripts/drupal install minimal" | ||
| "(chmod a+w sites/default || sudo chmod a+w sites/default) && rm -rf sites/default/files && rm -f sites/default/settings.php && php scripts/erase_drupal_db.php && php core/scripts/drupal install minimal | grep -v 'Password:'" |
There was a problem hiding this comment.
Preserve the Drupal install exit status
When core/scripts/drupal install emits any ordinary stdout before failing, grep -v finds that output and exits successfully, so Composer treats this post-update script as successful despite the failed installation. In the Drupal targets, this also prevents the retry loop in Makefile from retrying and allows the .lock-php marker to be touched for an incomplete site; preserve the install command's status while filtering its output. The same pipeline is present in all three modified composer files.
Useful? React with 👍 / 👎.
|
Avoid being flagged by password scanners.