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

Multiple output files with templates #1409

Closed
mihaiandreiratoiu opened this issue Dec 16, 2022 · 4 comments · Fixed by #1521
Closed

Multiple output files with templates #1409

mihaiandreiratoiu opened this issue Dec 16, 2022 · 4 comments · Fixed by #1521
Assignees
Labels
bug Something isn't working

Comments

@mihaiandreiratoiu
Copy link

Description

When running syft with multiple -o=template -t=templateFile parameters it takes the latest templateFile for every output file

Example

Input syft alpine -o template=f1.json -t f1.template -o template=f2.json -t f2.template
Output:

  • f1.json with f2.template
  • f2.json with f2.template
@mihaiandreiratoiu mihaiandreiratoiu added the bug Something isn't working label Dec 16, 2022
@kzantow
Copy link
Contributor

kzantow commented Dec 16, 2022

As a workaround, if you need multiple templates, could you store the Syft JSON and then convert it?

syft alpine -o json > alpine.syft.json
syft convert alpine.syft.json -o template -t f1.template1 > f1.json
syft convert alpine.syft.json -o template -t f2.template1 > f2.json

@tgerla tgerla added this to OSS Dec 16, 2022
@kzantow kzantow moved this to Parking Lot (Comments or Progress) in OSS Dec 16, 2022
@mihaiandreiratoiu
Copy link
Author

Hey, sorry for the delayed response. Thanks for the tip. I've tried it but it seems that convert doesn't support the template? I get the 2023/01/10 17:49:22 error during command execution: 1 error occurred: * no template file: please provide a template path even when using -t

@kzantow
Copy link
Contributor

kzantow commented Jan 12, 2023

This sounds like something we should be able to fix for the convert command!

@kzantow kzantow moved this from Parking Lot (Comments or Progress) to Backlog (Pulled Forward for Priority) in OSS Jan 12, 2023
@mihaiandreiratoiu
Copy link
Author

Great, thanks!

@kzantow kzantow self-assigned this Jan 26, 2023
@kzantow kzantow moved this from Backlog to In Progress in OSS Jan 26, 2023
@kzantow kzantow moved this from In Progress to In Review in OSS Jan 26, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in OSS Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants