Skip to content

Commit

Permalink
conan-io#6693 Show description for conan info
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Mar 24, 2020
1 parent b4cc2fc commit 7f60061
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions conans/client/printer.py
Expand Up @@ -98,6 +98,7 @@ def _print(it_field, show_field=None, name=None, color=Color.BRIGHT_GREEN):
self._out.writeln(" %s: %s" % (lead_str, licenses_str), Color.BRIGHT_GREEN)

_print("author", name="Author")
_print("description", name="Description")

if show("topics") and "topics" in it:
self._out.writeln(" Topics: %s" % ", ".join(it["topics"]), Color.BRIGHT_GREEN)
Expand Down
8 changes: 7 additions & 1 deletion conans/test/functional/command/info_test.py
Expand Up @@ -313,6 +313,7 @@ def test_reuse(self):
Remote: None
URL: myurl
License: MIT
Description: blah
Recipe: No remote%s
Binary: Missing
Binary remote: None
Expand All @@ -322,6 +323,7 @@ def test_reuse(self):
Remote: None
URL: myurl
License: MIT
Description: blah
Recipe: No remote%s
Binary: Missing
Binary remote: None
Expand All @@ -332,6 +334,7 @@ def test_reuse(self):
conanfile.py (Hello2/0.1)
URL: myurl
Licenses: MIT, GPL
Description: foobar
Requires:
Hello1/0.1@lasote/stable""")

Expand Down Expand Up @@ -385,12 +388,15 @@ def clean_output(output):
Hello0/0.1@lasote/stable
URL: myurl
License: MIT
Description: blah
Hello1/0.1@lasote/stable
URL: myurl
License: MIT
Description: blah
conanfile.py (Hello2/0.1)
URL: myurl
Licenses: MIT, GPL""")
Licenses: MIT, GPL
Description: foobar""")
self.assertIn(expected_output, clean_output(self.client.out))

def test_json_info_outputs(self):
Expand Down

0 comments on commit 7f60061

Please sign in to comment.