FelixHerrmann/swift-package-list

Feature Request: Output into stdout

Closed this issue · 4 comments

Thanks for the very useful tool!

I would like to suggest that outputting into stdout might be a very useful addition to using this tool in various pipelines :-)

Currently I was able to capture the output by using mkfifo and juggling around with it, but if something goes wrong (e.g. Package.resolved is not in a current state so the tool crashes with a "file not found" error), the other end of the pipeline reading from the fifo gets stuck and has to time out...

Hey @vladkorotnev, thanks for the request. This is definitely a valuable addition to the tool, I will take a closer look to this when I find some time.

Just to clarify, there should be a flag which controls if the output as JSON or property list (PDF and settings bundle doesn't make sense) gets printed to the console instead of writing it to a file, right?

Hi @vladkorotnev, I've just added this functionality but it requires a major version release. It is accessible via a scan subcommand so you just have to add it to your existing configuration, e.g. swift-package-list scan ~/Desktop/Test/Test.xcodeproj.

Version is live, let me know if something needs to be adjusted!