public function execute(InputInterface $input, OutputInterface $output)
{
$webspaceKey = $input->getArgument('webspaceKey');
$locale = $input->getArgument('locale');
$basePath = $input->getOption('base-path');
$dryRun = $input->getOption('dry-run');
$path = $this->sessionManager->getRoutePath($webspaceKey, $locale);
$relativePath = $basePath !== null ? '/' . ltrim($basePath, '/') : '/';
$fullPath = rtrim($path . $relativePath, '/');
$this->cleanSession($output, $this->defaultSession, $fullPath, $dryRun);
$this->cleanSession($output, $this->liveSession, $fullPath, $dryRun);
if (false === $dryRun) {
$this->defaultSession->save();
$this->liveSession->save();
$output->writeln('<info>Save complete</info>');
} else {
$output->writeln('<info>Dry run complete</info>');
}
}