Skip to content

Commit 9ec4cc7

Browse files
committed
Make reviewer happy
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent 47970e3 commit 9ec4cc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/evaluation/eval.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ func (r *Runner) runCagentInContainer(ctx context.Context, imageID, question str
375375
// Pass additional environment variables specified via -e flag
376376
// Format: KEY or KEY=VALUE
377377
for _, entry := range r.EnvVars {
378-
if key, val, hasValue := strings.Cut(entry, "="); hasValue {
378+
if key, val, hasValue := strings.Cut(entry, "="); hasValue && key != "" {
379379
args = append(args, "-e", key)
380380
env = append(env, key+"="+val)
381-
} else if val, ok := r.runConfig.EnvProvider().Get(ctx, entry); ok {
381+
} else if val, ok := r.runConfig.EnvProvider().Get(ctx, entry); ok && entry != "" {
382382
args = append(args, "-e", entry)
383383
env = append(env, entry+"="+val)
384384
}

0 commit comments

Comments
 (0)