Skip to content

Commit

Permalink
Allow const as argdep
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel committed Sep 20, 2023
1 parent 611ba15 commit b18619b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/leeway/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ func loadComponent(ctx context.Context, workspace *Workspace, path string, args
for k, v := range compconst.Constants {
// constants overwrite args
compargs[k] = v
log.WithField("comp", path).WithField("const", k).Debug("using const as arg")
}

// replace build args
Expand Down Expand Up @@ -660,7 +661,10 @@ func loadComponent(ctx context.Context, workspace *Workspace, path string, args

// re-set the version relevant arguments to <name>: <value>
for i, argdep := range pkg.ArgumentDependencies {
val, ok := args[argdep]
val, ok := pkg.C.Constants[argdep]
if !ok {
val, ok = args[argdep]
}
if !ok {
val = "<not-set>"
}
Expand Down

0 comments on commit b18619b

Please sign in to comment.