From 5e9c5cf66cf17beed545139f3becbecc7813df1d Mon Sep 17 00:00:00 2001 From: Erik Flodin Date: Sun, 27 Dec 2020 22:22:32 +0100 Subject: [PATCH] Issue legacy path warnings to stderr To make it possible to ignore the warning e.g. when running yadm introspect repo in the bash completion. --- test/test_unit_issue_legacy_path_warning.py | 6 +++--- yadm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_unit_issue_legacy_path_warning.py b/test/test_unit_issue_legacy_path_warning.py index da652c0..e43228b 100644 --- a/test/test_unit_issue_legacy_path_warning.py +++ b/test/test_unit_issue_legacy_path_warning.py @@ -34,8 +34,8 @@ def test_legacy_warning(tmpdir, runner, yadm, upgrade, override, legacy_path): """ run = runner(command=['bash'], inp=script) assert run.success - assert run.err == '' + assert run.out == '' if legacy_path and (not upgrade) and (not override): - assert 'Legacy paths have been detected' in run.out + assert 'Legacy paths have been detected' in run.err else: - assert 'Legacy paths have been detected' not in run.out + assert 'Legacy paths have been detected' not in run.err diff --git a/yadm b/yadm index 7a1bf93..b8d3fe2 100755 --- a/yadm +++ b/yadm @@ -1506,7 +1506,7 @@ function issue_legacy_path_warning() { path_list="$path_list * $legacy_path"$'\n' done - cat <&2 **WARNING** Legacy paths have been detected.