Skip to content

Commit

Permalink
fix(cli): always define metadata.name first for CRDs (#68)
Browse files Browse the repository at this point in the history
so the output yaml file stays consistent even if the user didn't define any metadata
  • Loading branch information
shinebayar-g authored Dec 24, 2024
1 parent 53fdc64 commit a01edd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ async function main() {
],
statements: [
'super(args.metadata?.name || name);',
'this.metadata = args.metadata || { name };',
'this.metadata = {',
' name: args.metadata?.name || name,',
' ...args.metadata,',
'};',
'this.spec = args.spec;',
'app.addResource(this);',
],
Expand Down

0 comments on commit a01edd4

Please sign in to comment.