Skip to content

Commit

Permalink
New detect_api for profiles and global.conf (#14578)
Browse files Browse the repository at this point in the history
* wip

* fixes

* more fixes

* wip

* fix

* new test

* global template too
  • Loading branch information
memsharded authored Sep 14, 2023
1 parent 3430ad5 commit 7f6430a
Show file tree
Hide file tree
Showing 15 changed files with 551 additions and 490 deletions.
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

0 comments on commit 7f6430a

Please sign in to comment.