Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Request/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ private function getClient($base_uri = null): ClientInterface
'handler' => $stack,
];

// Enable cURL debug output if --curl-debug option is set
if ($this->getContainer()->has('input')) {
$input = $this->getContainer()->get('input');
if ($input->hasOption('curl-debug') && $input->getOption('curl-debug')) {
$params['debug'] = true;
}
}

$host_cert = $config->get('host_cert');
if ($host_cert !== null) {
$params[RequestOptions::CERT] = $host_cert;
Expand Down
3 changes: 3 additions & 0 deletions src/Terminus.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ private function addDefaultArgumentsAndOptions(Application $app)
$app->getDefinition()->addOption(
new InputOption('--yes', '-y', InputOption::VALUE_NONE, 'Answer all confirmations with "yes"')
);
$app->getDefinition()->addOption(
new InputOption('--curl-debug', null, InputOption::VALUE_NONE, 'Enable verbose cURL debug output for troubleshooting TLS and connection issues')
);
}

/**
Expand Down
Loading