Skip to content

Commit

Permalink
Beep in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Apr 10, 2024
1 parent 49e1981 commit 27ddf9e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added the `changelog` command, that will show changes included in the current SVN-Buddy release.
- Added `--author` option to the `log` command to display revisions, made by a specific author.
- Added `--with-revision-url` option to the `log` command to display URL (Phabricator only for now) for each shown revision.
- Sends a beep to the Terminal, when an error occurs during any command execution.

### Changed
- Dropped support for PHP 5.4 and PHP 5.5 versions.
Expand Down
27 changes: 15 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions src/SVNBuddy/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


use ConsoleHelpers\ConsoleKit\Command\AbstractCommand as BaseCommand;
use ConsoleHelpers\ConsoleKit\Exception\CommandException;
use ConsoleHelpers\SVNBuddy\Config\CommandConfig;
use ConsoleHelpers\SVNBuddy\Repository\Connector\Connector;
use ConsoleHelpers\SVNBuddy\Repository\RevisionLog\RevisionLog;
Expand Down Expand Up @@ -170,6 +171,22 @@ protected function prepareDependencies()
$this->_updateManager = $container['update_manager'];
}

/**
* @inheritDoc
*
* @throws CommandException When command exception is caught.
*/
public function run(InputInterface $input, OutputInterface $output)
{
try {
return parent::run($input, $output);
}
catch ( CommandException $e ) {
$this->io->notify();
throw $e;
}
}

/**
* Returns command setting value.
*
Expand Down

0 comments on commit 27ddf9e

Please sign in to comment.