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

New detect_api for profiles and global.conf #14578

Merged
merged 10 commits into from
Sep 14, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions conan/cli/commands/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ def profiles_list_cli_output(profiles):
cli_out_write(p)


def detected_profile_cli_output(detect_profile):
cli_out_write("Detected profile:")
cli_out_write(detect_profile.dumps())


@conan_subcommand(formatters={"text": print_profiles})
def profile_show(conan_api, parser, subparser, *args):
"""
Expand Down Expand Up @@ -63,7 +58,9 @@ def profile_detect(conan_api, parser, subparser, *args):
raise ConanException(f"Profile '{profile_pathname}' already exists")

detected_profile = conan_api.profiles.detect()
detected_profile_cli_output(detected_profile)
ConanOutput().success("\nDetected profile:")
cli_out_write(detected_profile.dumps())

contents = detected_profile.dumps()
ConanOutput().warning("This profile is a guess of your environment, please check it.")
if detected_profile.settings.get("os") == "Macos":
Expand Down
Loading