Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display user/channel correctly in export output #8732

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions conans/client/cmd/export.py
Expand Up @@ -85,6 +85,8 @@ def cmd_export(app, conanfile_path, name, version, user, channel, keep_source,
channel = None

ref = ConanFileReference(conanfile.name, conanfile.version, user, channel)
conanfile.display_name = str(ref)
conanfile.output.scope = conanfile.display_name

# If we receive lock information, python_requires could have been locked
if graph_lock:
Expand Down
23 changes: 23 additions & 0 deletions conans/test/integration/command/export/test_export.py
@@ -0,0 +1,23 @@
import textwrap

from conans.test.utils.tools import TestClient


def test_basic():
client = TestClient()
conanfile = textwrap.dedent("""
from conans import ConanFile
class TestConan(ConanFile):
name = "hello"
version = "1.2"
default_user = "myuser"
default_channel = "mychannel"
""")
client.save({"conanfile.py": conanfile})
client.run("export .")
assert "hello/1.2@myuser/mychannel" in client.out
client.run("search *")
assert "hello/1.2@myuser/mychannel" in client.out
client.run("create .")
assert "hello/1.2@myuser/mychannel" in client.out
assert "hello/1.2:" not in client.out