From 68e8b7e93632fa5bf5d19f1366f3e297101ff63f Mon Sep 17 00:00:00 2001 From: lc6464 <64722907+lc6464@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:00:41 +0800 Subject: [PATCH] refactor(web): remove useless --version fallback --- web/backend/api/version.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/web/backend/api/version.go b/web/backend/api/version.go index c7d884766..06cd0a031 100644 --- a/web/backend/api/version.go +++ b/web/backend/api/version.go @@ -83,19 +83,14 @@ func (h *Handler) resolveSystemVersionInfo() systemVersionResponse { return parsed } -// executePicoclawVersion runs version commands against the discovered picoclaw -// executable. It tries subcommand form first, then --version fallback. +// executePicoclawVersion runs the version subcommand against the +// discovered picoclaw executable. func executePicoclawVersion(ctx context.Context, execPath string) (string, error) { out, err := exec.CommandContext(ctx, execPath, "version").CombinedOutput() if err == nil { return string(out), nil } - flagOut, flagErr := exec.CommandContext(ctx, execPath, "--version").CombinedOutput() - if flagErr == nil { - return string(flagOut), nil - } - return string(out), fmt.Errorf("failed to execute version command: %w", err) }