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

[feature] add --format=json to conan cache path #15599

Closed
1 task
jcar87 opened this issue Feb 5, 2024 · 2 comments · Fixed by #15613
Closed
1 task

[feature] add --format=json to conan cache path #15599

jcar87 opened this issue Feb 5, 2024 · 2 comments · Fixed by #15613
Assignees
Milestone

Comments

@jcar87
Copy link
Contributor

jcar87 commented Feb 5, 2024

What is your suggestion?

I would like for conan to be able to give me a machine readable file, rather than having to pipe the output of the conan cache path command.

There's nothing wrong with piping, but this makes life slightly easier on a CI system that needs to support both bash syntax and bat/cmd syntax on Windows.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@AbrilRBS AbrilRBS added this to the 2.1 milestone Feb 5, 2024
@AbrilRBS
Copy link
Member

AbrilRBS commented Feb 5, 2024

We probably want this extended to conan config home if we end up likeing this idea

@memsharded
Copy link
Member

These 2 commands were intended to get the "text" output also valid for automation. So when a command returns a single string (path) as a result, the text in stdout will be equivalent to a potential json output with

{"path": "/result/path"}

Though maybe the line ending in the terminal is disturbing the "text" flow? In that case, sure, I don't oppose to have a json formatter for these commands, good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants