Skip to content

Commit

Permalink
Issue legacy path warnings to stderr
Browse files Browse the repository at this point in the history
To make it possible to ignore the warning e.g. when running yadm
introspect repo in the bash completion.
  • Loading branch information
erijo committed Dec 27, 2020
1 parent df2ff5e commit 5e9c5cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/test_unit_issue_legacy_path_warning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion yadm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5e9c5cf

Please sign in to comment.