Is your feature request related to a problem? Please describe.
When operator-sdk olm-catalog gen-csv is run from a directory not root in the project, it creates a new deploy folder at that point and then fills it out with very little valid data. It also warns that it can't find previous version when used with --from-version. This experience is a bit jolting the first couple times.
This part of my setup may be unique. My git repo has the operator nested one directory into the root of the repo.
Describe the solution you'd like
If we are within a project, the command should be able to find the deploy directory and act accordingly or at least die without creating useless resources that have to be manually cleaned up. A full-fledged error wouldn't hurt to let the user know that something didn't work.
A possible solution for it could be ensure that the command will just work if it is in the root dir. I mean to validate the path by using the func which already exists (projutil.MustInProjectRoot()) to check if it is or not in the root dir of the project.
That would make probably make the issue and solution clear.
Most helpful comment
A possible solution for it could be ensure that the command will just work if it is in the root dir. I mean to validate the path by using the func which already exists (
projutil.MustInProjectRoot()) to check if it is or not in the root dir of the project.