diff --git a/src/Command/Push/PushArtifactCommand.php b/src/Command/Push/PushArtifactCommand.php index d31413e33..01e504a59 100644 --- a/src/Command/Push/PushArtifactCommand.php +++ b/src/Command/Push/PushArtifactCommand.php @@ -159,9 +159,8 @@ private function determineDestinationGitUrls(): array if ($envVar = getenv('ACLI_PUSH_ARTIFACT_DESTINATION_GIT_URLS')) { return explode(',', $envVar); } - - if ($this->datastoreAcli->get('push.artifact.destination-git-urls')) { - return $this->datastoreAcli->get('push.artifact.destination-git-urls'); + if ($this->datastoreAcli->get('push.artifact.destination_git_urls')) { + return $this->datastoreAcli->get('push.artifact.destination_git_urls'); } $applicationUuid = $this->determineCloudApplication(); diff --git a/src/Config/AcquiaCliConfig.php b/src/Config/AcquiaCliConfig.php index 7d0f6c3c2..8124fcb0e 100644 --- a/src/Config/AcquiaCliConfig.php +++ b/src/Config/AcquiaCliConfig.php @@ -19,10 +19,20 @@ public function getConfigTreeBuilder(): TreeBuilder $treeBuilder = new TreeBuilder('acquia_cli'); $treeBuilder ->getRootNode() - ->children() - ->scalarNode('cloud_app_uuid') - ->end() - ->end(); + ->children() + ->scalarNode('cloud_app_uuid')->end() + ->arrayNode('push') + ->children() + ->arrayNode('artifact') + ->children() + ->arrayNode('destination_git_urls') + ->scalarPrototype()->end() + ->end() + ->end() + ->end() + ->end() + ->end() + ->end(); return $treeBuilder; } } diff --git a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php index f32bc7e69..1d14a2135 100644 --- a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php +++ b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php @@ -122,12 +122,12 @@ public function testPushTagArtifact(): void public function testPushArtifactWithAcquiaCliFile(): void { - $this->datastoreAcli->set('push.artifact.destination-git-urls', [ + $this->datastoreAcli->set('push.artifact.destination_git_urls', [ 'https://github.com/example1/cli.git', 'https://github.com/example2/cli.git', ]); $localMachineHelper = $this->mockLocalMachineHelper(); - $this->setUpPushArtifact($localMachineHelper, 'master', $this->datastoreAcli->get('push.artifact.destination-git-urls')); + $this->setUpPushArtifact($localMachineHelper, 'master', $this->datastoreAcli->get('push.artifact.destination_git_urls')); $this->executeCommand([ '--destination-git-branch' => 'master', ]);