protected function getTarExecutable()
{
$candidates = ['tar', 'tar.exe', 'bsdtar.exe'];
foreach ($candidates as $command) {
if ($this->shellHelper->commandExists($command)) {
return $command;
}
}
throw new \RuntimeException("Tar command not found");
}