Skip to content

Commit db20367

Browse files
fix(cli): drop duplicate vendor steps and reuse ValidArch
ResolveForVendor already logs acquisition progress to stderr; remove redundant StepStart/StepDone pairs. Use binary.ValidArch in sandboxArch. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ce2c94d commit db20367

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

internal/cli/run.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,8 +1601,6 @@ func needsCrossCompilation() bool {
16011601
return runtime.GOOS != "linux"
16021602
}
16031603

1604-
var validArchs = map[string]bool{"amd64": true, "arm64": true}
1605-
16061604
// copyFile copies src to dst, preserving permissions.
16071605
func copyFile(src, dst string) error {
16081606
in, err := os.Open(src)
@@ -1635,7 +1633,7 @@ func copyFile(src, dst string) error {
16351633
// on an arm64 host via emulation). Only amd64 and arm64 are supported.
16361634
func sandboxArch() string {
16371635
if arch := os.Getenv("FULLSEND_SANDBOX_ARCH"); arch != "" {
1638-
if !validArchs[arch] {
1636+
if !binary.ValidArch(arch) {
16391637
fmt.Fprintf(os.Stderr, "WARNING: FULLSEND_SANDBOX_ARCH=%q is not a supported architecture (amd64, arm64), using host arch %s\n", arch, runtime.GOARCH)
16401638
return runtime.GOARCH
16411639
}

internal/cli/vendor.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,6 @@ func acquireAndVendorFullsendBinary(ctx context.Context, client forge.Client, pr
6060
tmpDir = result.TmpDir
6161
binPath = result.Path
6262
source = result.Source
63-
64-
switch source {
65-
case binary.SourceCheckoutBuild:
66-
printer.StepStart("Cross-compiling fullsend for linux/amd64")
67-
printer.StepDone("Cross-compiled fullsend for linux/amd64")
68-
case binary.SourceReleaseDownload:
69-
printer.StepStart(fmt.Sprintf("Downloading fullsend %s for linux/amd64 from GitHub Release", version))
70-
printer.StepDone(fmt.Sprintf("Downloaded fullsend %s for linux/amd64", version))
71-
}
7263
}
7364

7465
if tmpDir != "" {

0 commit comments

Comments
 (0)