Include bash version

This commit is contained in:
Tim Byrne 2022-01-17 11:45:09 -06:00
parent 8186705059
commit 32bc9abb0c
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
2 changed files with 6 additions and 3 deletions

View File

@ -29,8 +29,10 @@ def test_semantic_version(expected_version):
@pytest.mark.parametrize('cmd', ['--version', 'version'])
def test_reported_version(
runner, yadm_cmd, cmd, expected_version):
"""Report correct version, include git version"""
"""Report correct version and bash/git versions"""
run = runner(command=yadm_cmd(cmd))
assert run.success
assert run.err == ''
assert run.out.startswith(f'yadm version {expected_version}\ngit version')
assert 'bash version' in run.out
assert 'git version' in run.out
assert run.out.endswith(f'\nyadm version {expected_version}\n')

3
yadm
View File

@ -1413,8 +1413,9 @@ function upgrade() {
function version() {
echo "bash version $BASH_VERSION"
printf " "; "$GIT_PROGRAM" --version
echo "yadm version $VERSION"
"$GIT_PROGRAM" --version
exit_with_hook 0
}