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

steampipe query --output csv should not add a blank line at the end of file #2333

Closed
e-gineer opened this issue Aug 16, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@e-gineer
Copy link
Contributor

CSV output adds a blank line at the end, which is annoying for processing. It should not be there.

Current behavior:

/tmp $ steampipe query --output csv "select name from aws_s3_bucket"
name
my-bucket
another-bucket

/tmp $

Expected behavior:

/tmp $ steampipe query --output csv "select name from aws_s3_bucket"
name
my-bucket
another-bucket
/tmp $

First spotted here from @pauldougan

@e-gineer e-gineer added the bug Something isn't working label Aug 16, 2022
@e-gineer
Copy link
Contributor Author

We have code that adds a blank line between CSV (or other) output types when multiple queries are run:

/tmp/crap $ steampipe query *.sql --output csv
name
my_bucket
another_bucket

instance_id
i-abcd1234

if showBlankLineBetweenResults() {
fmt.Println()
}

It should only show blank lines between results, not after the last (and possibly only) result.

pauldougan added a commit to alphagov/paas-steampipe-dashboard that referenced this issue Aug 25, 2022
this has been fixed in turbot/steampipe#2333 in the new release so I have removed a sed command from the command
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
None yet
Development

No branches or pull requests

2 participants