-
Notifications
You must be signed in to change notification settings - Fork 281
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 should return file not found as error when the input file does not exist. Closes #1752 #3767
Conversation
3f2aa99
to
d811405
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have screenshots of the various errors
pkg/workspace/workspace_queries.go
Outdated
if err != nil { | ||
return nil, nil, fmt.Errorf("error opening file '%s': %s", sqlString, err.Error()) | ||
} | ||
fileQuery, fileExists, err := w.getQueryFromFile(filePath) | ||
if fileExists { | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move error check before if fileExists
pkg/workspace/workspace_queries.go
Outdated
// (just return the empty query - it will be filtered above) | ||
} | ||
return fileQuery, nil, nil | ||
} | ||
// sqlString is not a file name that exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// sqlString is not a file name that exists
=> // the argument cannot be resolved as an existing file
file not found
empty file
query resource not found in mod
cant open file