Skip to content

Commit

Permalink
[cbuild] Rework csolution list layers arguments in cbuild setup b…
Browse files Browse the repository at this point in the history
…ackground call (#301)

Address Open-CMSIS-Pack/devtools#1760

In the background `csolution list layers` call, remove the fixed
`--load=all` argument.
Take the arguments from the original `cbuild setup` call if specified.
  • Loading branch information
brondani authored Sep 12, 2024
1 parent 40fe18b commit 330eba4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/builder/csolution/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ func (b CSolutionBuilder) generateBuildFiles() (err error) {
log.Debug("error code received: " + errCodeStr)

if exitError.ExitCode() == 2 {
args = []string{"list", "layers", b.InputFile, "--context-set", "--load=all", "--update-idx", "--quiet"}
args = b.formulateArgs([]string{"list", "layers", "--update-idx"})
if !b.Options.Quiet {
// force --quiet
args = append(args, "--quiet")
}
_, listCmdErr := b.runCSolution(args, false)
log.Debug("csolution command: csolution " + strings.Join(args, " "))
if listCmdErr != nil {
Expand Down

0 comments on commit 330eba4

Please sign in to comment.