From 32bc9abb0c5992ba82fe9cae3a16260e3caf86b2 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 17 Jan 2022 11:45:09 -0600 Subject: [PATCH] Include bash version --- test/test_version.py | 6 ++++-- yadm | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_version.py b/test/test_version.py index 2f51f7e..d440d3b 100644 --- a/test/test_version.py +++ b/test/test_version.py @@ -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') diff --git a/yadm b/yadm index 94aa698..73e6044 100755 --- a/yadm +++ b/yadm @@ -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 }