diff --git a/src/alire/alire-index-search.adb b/src/alire/alire-index-search.adb index 82488da4a..54adf8914 100644 --- a/src/alire/alire-index-search.adb +++ b/src/alire/alire-index-search.adb @@ -24,7 +24,10 @@ package body Alire.Index.Search is Busy : Simple_Logging.Ongoing := Simple_Logging.Activity ("Searching"); begin - Table.Header ("NAME").Header ("DESCRIPTION"); + -- Preserve old behavior for human output + if Utils.Tables.Structured_Output then + Table.Header ("NAME").Header ("DESCRIPTION"); + end if; for Crate of Alire.Index.All_Crates.all loop if Lookup = "" or else diff --git a/src/alire/alire-solutions.adb b/src/alire/alire-solutions.adb index 536ba0711..d9609eb46 100644 --- a/src/alire/alire-solutions.adb +++ b/src/alire/alire-solutions.adb @@ -929,7 +929,10 @@ package body Alire.Solutions is Trace.Always ("There are no pins"); end if; else - Table.Header ("Crate").Header ("Target").Header ("Origin").New_Row; + -- To preserve old behavior with human output + if Utils.Tables.Structured_Output then + Table.Header ("Crate").Header ("Target").Header ("Origin").New_Row; + end if; for Dep of This.Dependencies loop if Dep.Is_Linked then diff --git a/testsuite/tests/pin/branch/test.py b/testsuite/tests/pin/branch/test.py index 53d2806c9..ad580c1f6 100644 --- a/testsuite/tests/pin/branch/test.py +++ b/testsuite/tests/pin/branch/test.py @@ -3,14 +3,12 @@ """ from drivers.alr import run_alr, alr_pin, alr_unpin, init_local_crate -from drivers.asserts import assert_eq, assert_match -from drivers.helpers import git_branch, git_head, init_git_repo +from drivers.asserts import assert_match +from drivers.helpers import git_branch, init_git_repo from e3.os.fs import touch -from re import escape import re import os -import shutil import subprocess # "remote" is going to be the remote crate