Skip to content
Snippets Groups Projects

Issue #3393633: Build tests can fail randomly if the stage ID begins with a -

1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -262,7 +262,11 @@ class ConsoleUpdateStage extends UpdateStage {
@@ -262,7 +262,11 @@ class ConsoleUpdateStage extends UpdateStage {
* The ID of the current stage.
* The ID of the current stage.
*/
*/
protected function triggerPostApply(string $stage_id): void {
protected function triggerPostApply(string $stage_id): void {
$arguments = "post-apply $stage_id";
// The stage ID needs to be quoted in order to prevent it from being parsed
 
// as a command-line option if it begins with -, which is a possibility
 
// because we use \Drupal\Component\Utility\Crypt::randomBytesBase64() to
 
// generate the stage ID, and the string it returns might begin with -.
 
$arguments = sprintf('post-apply "%s"', $stage_id);
if ($this->isFromWeb) {
if ($this->isFromWeb) {
$arguments .= ' --is-from-web';
$arguments .= ' --is-from-web';
}
}
Loading