1
0
Fork 0
mirror of synced 2024-11-17 06:45:33 -05:00

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.
This commit is contained in:
Erik Flodin 2020-12-27 22:22:32 +01:00
parent df2ff5ec70
commit 5e9c5cf66c
No known key found for this signature in database
GPG key ID: 420A7C865EE3F85F
2 changed files with 4 additions and 4 deletions

View file

@ -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

2
yadm
View file

@ -1506,7 +1506,7 @@ function issue_legacy_path_warning() {
path_list="$path_list * $legacy_path"$'\n'
done
cat <<EOF
cat <<EOF >&2
**WARNING**
Legacy paths have been detected.