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

Running 'steampipe query file_not_found.sql' should return a file not found error #1752

Closed
e-gineer opened this issue Mar 29, 2022 · 0 comments · Fixed by #3767
Closed

Running 'steampipe query file_not_found.sql' should return a file not found error #1752

e-gineer opened this issue Mar 29, 2022 · 0 comments · Fixed by #3767
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@e-gineer
Copy link
Contributor

I was very confused for a while today when putting Steampipe inside a cronjob and I hadn't set the current working directory properly.

Steampipe returns SQL errors if the file is not found ... so I kept checking my SQL code.

I wish Steampipe would detect that the input is in the shape of a file name and then return a file not found error instead?

/tmp/crap $ ls -al
total 0
drwxr-xr-x   2 nathan  wheel    64 Mar 29 10:58 .
drwxrwxrwt  38 root    wheel  1216 Mar 29 10:59 ..
/tmp/crap $ 
/tmp/crap $ steampipe query test.sql
Warning: executeQueries: query 1 of 1 failed: ERROR: syntax error at or near "test" (SQLSTATE 42601)

/tmp/crap $ 
/tmp/crap $ steampipe query /tmp/crap/test.sql
Warning: executeQueries: query 1 of 1 failed: ERROR: syntax error at or near "/" (SQLSTATE 42601)

/tmp/crap $ 
@e-gineer e-gineer added the enhancement New feature or request label Mar 29, 2022
@pskrbasu pskrbasu added this to the 0.21.0 milestone Aug 24, 2023
@pskrbasu pskrbasu self-assigned this Aug 24, 2023
@pskrbasu pskrbasu modified the milestones: 0.21.0, 0.20.0 Aug 24, 2023
@binaek binaek closed this as completed in 06860e5 Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment