Skip to content

Commit bbb91b5

Browse files
author
Eric Stroczynski
authored
cmd/operator-sdk/olmcatalog: gen-csv must run in project root (#2322)
* cmd/operator-sdk/olmcatalog: ensure gen-csv is run in the project root * CHANGELOG.md: add change
1 parent f817282 commit bbb91b5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
- Replace usage of `github.com/operator-framework/operator-sdk/pkg/restmapper.DynamicRESTMapper` with `sigs.k8s.io/controller-runtime/pkg/client/apiutil.DynamicRESTMapper`. ([#2309](https://github.com/operator-framework/operator-sdk/pull/2309))
1313
- Upgraded Helm operator packages and base image from Helm v2 to Helm v3. Cluster state for pre-existing CRs using Helm v2-based operators will be automatically migrated to Helm v3's new release storage format, and existing releases may be upgraded due to changes in Helm v3's label injection. ([#2080](https://github.com/operator-framework/operator-sdk/pull/2080))
14+
- Fail `operator-sdk olm-catalog gen-csv` if it is not run from a project's root, which the command already assumes is the case. ([#2322](https://github.com/operator-framework/operator-sdk/pull/2322))
1415

1516
### Deprecated
1617

cmd/operator-sdk/olmcatalog/gen-csv.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ Configure CSV generation by writing a config file 'deploy/olm-catalog/csv-config
7171
}
7272

7373
func genCSVFunc(cmd *cobra.Command, args []string) error {
74+
// The CSV generator assumes that the deploy and pkg directories are present
75+
// at runtime, so this command must be run in a project's root.
76+
projutil.MustInProjectRoot()
77+
7478
if len(args) != 0 {
7579
return fmt.Errorf("command %s doesn't accept any arguments", cmd.CommandPath())
7680
}

0 commit comments

Comments
 (0)