Closed mariuszkrzaczkowski closed 3 years ago
We use exec()
to figure out certain aspects of the terminal window based on the current operating system.
You can avoid the use of it by providing a custom System
implementation yourself that provides the details of the environment, something like this:
$system = new class extends \League\CLImate\Util\System\System {
public function width() {
return 120;
}
public function height() {
return 40;
}
protected function systemHasAnsiSupport() {
return true;
}
public function exec($command, $full = false) {
return '';
}
};
$factory = new UtilFactory($system);
$climate->setUtil($factory);
Although I can see you're using checkboxes and we also depend on stty
there, so I don't think the above will work correctly for your particular use case
did not work :/ is there any other workaround for this? exec blocking multiple servers
Is the exec function mandatory ??? my security policy does not allow it?