Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Removed

### Bug Fixes
- Configure the repo path correctly in `operator-sdk add crd` and prevent the command from running outside of an operator project. ([#1660](https://github.com/operator-framework/operator-sdk/pull/1660))

## v0.10.0

Expand Down
3 changes: 3 additions & 0 deletions cmd/operator-sdk/add/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ Generated CR filename: <project-name>/deploy/crds/<group>_<version>_<kind>_cr.y
}

func crdFunc(cmd *cobra.Command, args []string) error {
projutil.MustInProjectRoot()

cfg := &input.Config{
AbsProjectPath: projutil.MustGetwd(),
Repo: projutil.GetGoPkg(),
}
if len(args) != 0 {
return fmt.Errorf("command %s doesn't accept any arguments", cmd.CommandPath())
Expand Down