From ed1a0ba254ae9e43f029173251effa4ce3c54bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=A0=E6=B8=9A=E5=90=AC=E6=BD=AE?= <108173440+reiasu2@users.noreply.github.com> Date: Sat, 5 Dec 2026 12:01:30 +0800 Subject: [PATCH] fix(reims): drop uncalled PostCreateSetOpts and PreviewCreateCommand wrappers --- internal/macos/reims/compat_test.go | 4 ++-- internal/macos/reims/reims.go | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/internal/macos/reims/compat_test.go b/internal/macos/reims/compat_test.go index 840a73a..6e9fc52 100644 --- a/internal/macos/reims/compat_test.go +++ b/internal/macos/reims/compat_test.go @@ -611,7 +611,7 @@ func TestCreateDefaultNVMeAndPreview(t *testing.T) { if EffectiveCreateCapture(opts) { t.Fatalf("EffectiveCreateCapture default = true, want false") } - cmd, err := PreviewCreateCommand(opts) + cmd, err := PreviewCreateCommandWithCapture(opts, true) if err != nil { t.Fatal(err) } @@ -621,7 +621,7 @@ func TestCreateDefaultNVMeAndPreview(t *testing.T) { opts.DiskController = "ahci" on := true opts.Capture = &on - cmdAhciCaptureOn, err := PreviewCreateCommand(opts) + cmdAhciCaptureOn, err := PreviewCreateCommandWithCapture(opts, true) if err != nil { t.Fatal(err) } diff --git a/internal/macos/reims/reims.go b/internal/macos/reims/reims.go index 7f9c0b6..b5c7ea6 100644 --- a/internal/macos/reims/reims.go +++ b/internal/macos/reims/reims.go @@ -445,13 +445,9 @@ func EffectiveCreateCapture(o CreateOpts) bool { return false } -// PostCreateSetOpts returns follow-up `reims-ctl set` options for defaults that +// PostCreateSetOptsWithCapture returns follow-up `reims-ctl set` options for defaults that // `reims-ctl create` does not accept directly (upstream 3731afd defaults to // SATA/AHCI and capture=true). -func PostCreateSetOpts(o CreateOpts) (SetOpts, bool) { - return PostCreateSetOptsWithCapture(o, true) -} - func PostCreateSetOptsWithCapture(o CreateOpts, captureSupported bool) (SetOpts, bool) { so := SetOpts{Name: o.Name} need := false @@ -467,11 +463,7 @@ func PostCreateSetOptsWithCapture(o CreateOpts, captureSupported bool) (SetOpts, return so, need } -// PreviewCreateCommand formats the exact CLI command shown on Step 5 of the wizard. -func PreviewCreateCommand(o CreateOpts) (string, error) { - return PreviewCreateCommandWithCapture(o, true) -} - +// PreviewCreateCommandWithCapture formats the exact CLI command shown on Step 5 of the wizard. func PreviewCreateCommandWithCapture(o CreateOpts, captureSupported bool) (string, error) { args, err := BuildCreateArgs(o) if err != nil {