Skip to content

Commit 77d4130

Browse files
authored
*: better docs and error reporting for project type issue (#728)
1 parent fa72147 commit 77d4130

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/migration/v0.1.0-migration-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ However if there are any operator specific flags or settings defined in the old
272272
273273
If you have any 3rd party resource types registered with the SDK's scheme, then register those with the Manager's scheme in the new project. See how to [register 3rd party resources][register-3rd-party-resources].
274274
275+
`operator-sdk` now expects `cmd/manager/main.go` to be present in Go operator projects. Go project-specific commands, ex. `add [api, controller]`, will error if `main.go` is not found in its expected path.
276+
275277
### Copy user defined files
276278
277279
If there are any user defined pkgs, scripts, and docs in the older project, copy these files into the new project.

internal/util/projutil/project_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func MustGoProjectCmd(cmd *cobra.Command) {
5959
switch t {
6060
case OperatorTypeGo:
6161
default:
62-
log.Fatalf("'%s' can only be run for Go operators.", cmd.CommandPath())
62+
log.Fatalf("'%s' can only be run for Go operators; %s does not exist.", cmd.CommandPath(), mainFile)
6363
}
6464
}
6565

0 commit comments

Comments
 (0)