Skip to content

Commit ede6d2a

Browse files
committed
Updated command name; Fixed seg fault by closing ssh2 exec stream
1 parent c294e34 commit ede6d2a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/Commands/ProfileCommand.php renamed to app/Commands/ConfigureCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use HnhDigital\CliHelper\FileSystemTrait;
99
use LaravelZero\Framework\Commands\Command;
1010

11-
class ProfileCommand extends Command
11+
class ConfigureCommand extends Command
1212
{
1313
use CommandInternalsTrait, FileSystemTrait, SharedTrait;
1414

@@ -17,14 +17,14 @@ class ProfileCommand extends Command
1717
*
1818
* @var string
1919
*/
20-
protected $signature = 'profile';
20+
protected $signature = 'configure';
2121

2222
/**
2323
* The description of the command.
2424
*
2525
* @var string
2626
*/
27-
protected $description = 'Configure profiles to be used to manage mysql databases';
27+
protected $description = 'Configure profiles and connections';
2828

2929
/**
3030
* Profiles.
@@ -248,6 +248,7 @@ private function testRemoteProfile($profile, $name)
248248
$binary_exists_stream = ssh2_exec($connection, 'command -v "mysql-helper" >/dev/null 2>&1; echo $?');
249249
stream_set_blocking($binary_exists_stream, true);
250250
$binary_exists = !(boolean) stream_get_contents($binary_exists_stream);
251+
fclose($binary_exists_stream);
251252

252253
if (!$binary_exists) {
253254
$this->error(sprintf(' ❌ mysql-helper binary does not exist', $name));

0 commit comments

Comments
 (0)