I made a bash script for rebuilding my satis repository. I want to add some logging, because the command will be run automatically.
When I execute
output="$(php -f vendor/bin/satis build \
--repository-url git@bitbucket.org:example/gibberish.git satis.json web/ -n)"
$output should be
[InvalidArgumentException] Specified repository url "git@bitbucket.org:example/gibberish.git" does not exist.
build [--repository-url [REPOSITORY-URL]] [--no-html-output] [--skip-errors] [--stats] [--] [] [] []...
However, I only get Scanning packages
How do I catch an exception thrown by a PHP script in Bash?