Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true


jobs:
analyze:
name: Analyze
Expand All @@ -30,20 +35,18 @@ jobs:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false

steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit

- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Initialize CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
with:
languages: go
queries: security-and-quality
Expand All @@ -53,4 +56,4 @@ jobs:
go build ./cmd/cbuild

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
3 changes: 3 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
permissions:
contents: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
dependency-review:
if: github.repository_owner == 'Open-CMSIS-Pack'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
# Declare default permissions as read only.
permissions: read-all

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
copyright:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
# Declare default permissions as read only.
permissions: read-all

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
markdown-check:
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/markdown-lint.yml@v1.0.3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build-and-verify:
permissions:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
# Declare default permissions as read only.
permissions: read-all

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
analysis:
# Avoid running this on forks
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tpip-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

env:
tpip_report: "third_party_licenses.md"
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

permissions:
contents: read
Expand Down
18 changes: 13 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
**/*.bat
**/*.exe
**/*.exe~
**/*.dll
**/*.so
**/*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
**/.clangd

# Dependency directories (remove the comment below to include it)
# vendor/

# Folders
**/etc/*
.vscode
test/*/
!test/data/
6 changes: 4 additions & 2 deletions cmd/cbuild/commands/list/list_contexts.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024 Arm Limited. All rights reserved.
* Copyright (c) 2023-2026 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -52,7 +52,9 @@ func listContexts(cmd *cobra.Command, args []string) error {
filter, _ := cmd.Flags().GetString("filter")
p := csolution.CSolutionBuilder{
BuilderParams: builder.BuilderParams{
Runner: utils.Runner{},
Runner: utils.Runner{
IsListCmd: true,
},
Options: builder.Options{
SchemaChk: !noSchemaChk,
Filter: filter,
Expand Down
6 changes: 4 additions & 2 deletions cmd/cbuild/commands/list/list_environment.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024 Arm Limited. All rights reserved.
* Copyright (c) 2023-2026 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -26,7 +26,9 @@ func listEnvironment(cmd *cobra.Command, args []string) error {

p := csolution.CSolutionBuilder{
BuilderParams: builder.BuilderParams{
Runner: utils.Runner{},
Runner: utils.Runner{
IsListCmd: true,
},
InstallConfigs: configs,
},
}
Expand Down
6 changes: 4 additions & 2 deletions cmd/cbuild/commands/list/list_target_sets.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Arm Limited. All rights reserved.
* Copyright (c) 2025-2026 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -55,7 +55,9 @@ func listTargetSets(cmd *cobra.Command, args []string) error {

p := csolution.CSolutionBuilder{
BuilderParams: builder.BuilderParams{
Runner: utils.Runner{},
Runner: utils.Runner{
IsListCmd: true,
},
Options: builder.Options{
SchemaChk: !noSchemaChk,
Filter: filter,
Expand Down
6 changes: 4 additions & 2 deletions cmd/cbuild/commands/list/list_toolchains.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024 Arm Limited. All rights reserved.
* Copyright (c) 2023-2026 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -53,7 +53,9 @@ func listToolchains(cmd *cobra.Command, args []string) error {

p := csolution.CSolutionBuilder{
BuilderParams: builder.BuilderParams{
Runner: utils.Runner{},
Runner: utils.Runner{
IsListCmd: true,
},
Options: builder.Options{
Contexts: contexts,
UseContextSet: useContextSet,
Expand Down
7 changes: 4 additions & 3 deletions pkg/utils/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ type RunnerInterface interface {
}

type Runner struct {
outBytes []byte
quiet bool
outBytes []byte // Captures the output bytes from the executed command
quiet bool // If true, suppresses output to the standard logger
IsListCmd bool // Indicates if the current command is a 'list' command
}

func (r *Runner) Write(bytes []byte) (n int, err error) {
Expand All @@ -50,7 +51,7 @@ func (r Runner) ExecuteCommand(program string, quiet bool, args ...string) (stri
}

var err error
if !quiet && isTerminal() {
if !r.IsListCmd && isTerminal() {
// Use pty to preserve colors and interactive output
ptmx, ptyErr := pty.New()
if ptyErr == nil {
Expand Down
Loading