File tree Expand file tree Collapse file tree
thirdparty/cmdconfig/commands/cmdeval Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,8 +86,11 @@ type Runner struct {
8686func (r * Runner ) InitDefaults () {
8787 r .RunnerOptions .InitDefaults (runneroptions .GHCRImagePrefix )
8888 // Initialize CEL environment for condition evaluation
89- // Ignore error as conditions are optional; if CEL init fails, conditions will error at runtime
90- _ = r .RunnerOptions .InitCELEnvironment ()
89+ // Fail early if initialization does not succeed because we might
90+ // need CEL to evaluate conditions
91+ if err := r .RunnerOptions .InitCELEnvironment (); err != nil {
92+ fmt .Fprintf (os .Stderr , "failed to initialize CEL environment: %v\n " , err )
93+ }
9194}
9295
9396func (r * Runner ) preRunE (_ * cobra.Command , args []string ) error {
Original file line number Diff line number Diff line change @@ -171,8 +171,11 @@ type EvalFnRunner struct {
171171func (r * EvalFnRunner ) InitDefaults () {
172172 r .RunnerOptions .InitDefaults (runneroptions .GHCRImagePrefix )
173173 // Initialize CEL environment for condition evaluation
174- // Ignore error as conditions are optional; if CEL init fails, conditions will error at runtime
175- _ = r .RunnerOptions .InitCELEnvironment ()
174+ // Fail early if initialization does not succeed because we might
175+ // need CEL to evaluate conditions
176+ if err := r .RunnerOptions .InitCELEnvironment (); err != nil {
177+ fmt .Fprintf (os .Stderr , "failed to initialize CEL environment: %v\n " , err )
178+ }
176179}
177180
178181func (r * EvalFnRunner ) runE (c * cobra.Command , _ []string ) error {
You can’t perform that action at this time.
0 commit comments