Skip to content

Commit ef2afea

Browse files
committed
fix(dagger): rename debug parameter to avoid conflict with built-in flag
The `debug` parameter in AddRawEvidence and AddFileEvidence conflicts with Dagger's built-in --debug global flag, causing "flag already exists" errors at runtime. Rename to `debugMode` (exposed as --debug-mode) to avoid the collision. Both --debug and --verbose are reserved by Dagger, so debugMode is used instead. Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Chainloop-Trace-Sessions: a8191e8b-5f3a-461b-a872-b312af60a7fb
1 parent 443059f commit ef2afea

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

extras/dagger/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ func (att *Attestation) AddRawEvidence(
394394
// Skip strict schema validation for structured materials (SBOM_CYCLONEDX_JSON, OPENAPI_SPEC, ASYNCAPI_SPEC)
395395
// +optional
396396
noStrictValidation bool,
397-
// Enable debug/verbose logging
397+
// Enable debug logging
398398
// +optional
399-
debug bool,
399+
debugMode bool,
400400
) (*Attestation, error) {
401401
args := []string{
402402
"attestation", "add",
@@ -426,7 +426,7 @@ func (att *Attestation) AddRawEvidence(
426426
args = append(args, "--no-strict-validation")
427427
}
428428

429-
if debug {
429+
if debugMode {
430430
args = append(args, "--debug")
431431
}
432432

@@ -458,9 +458,9 @@ func (att *Attestation) AddFileEvidence(
458458
// Skip strict schema validation for structured materials (SBOM_CYCLONEDX_JSON, OPENAPI_SPEC, ASYNCAPI_SPEC)
459459
// +optional
460460
noStrictValidation bool,
461-
// Enable debug/verbose logging
461+
// Enable debug logging
462462
// +optional
463-
debug bool,
463+
debugMode bool,
464464
) (*Attestation, error) {
465465
filename, err := path.Name(ctx)
466466
if err != nil {
@@ -497,7 +497,7 @@ func (att *Attestation) AddFileEvidence(
497497
args = append(args, "--no-strict-validation")
498498
}
499499

500-
if debug {
500+
if debugMode {
501501
args = append(args, "--debug")
502502
}
503503

0 commit comments

Comments
 (0)