Skip to content

Commit

Permalink
build: use slices.Clone for copying slice (ethereum#30716)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiangxu authored Nov 3, 2024
1 parent a1093d9 commit c48e936
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import (
"path"
"path/filepath"
"runtime"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -226,8 +227,7 @@ func doInstall(cmdline []string) {

// Do the build!
for _, pkg := range packages {
args := make([]string, len(gobuild.Args))
copy(args, gobuild.Args)
args := slices.Clone(gobuild.Args)
args = append(args, "-o", executablePath(path.Base(pkg)))
args = append(args, pkg)
build.MustRun(&exec.Cmd{Path: gobuild.Path, Args: args, Env: gobuild.Env})
Expand Down

0 comments on commit c48e936

Please sign in to comment.