Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
fix: accept compose version output on error
Mason Kim(ZINUS US_SALES)92232f57553c
diff --git a/backend/cmd/installer/checker/helpers.go b/backend/cmd/installer/checker/helpers.goindex 612364be..b00cd11d 100644--- a/backend/cmd/installer/checker/helpers.go+++ b/backend/cmd/installer/checker/helpers.go@@ -243,7 +243,7 @@ func checkDockerComposeVersion() DockerVersion {func checkDockerComposeVersionWithRunner(run func(name string, args ...string) ([]byte, error)) DockerVersion {output, err := run("docker", "compose", "version")- if err != nil {+ if err != nil && len(output) == 0 {return DockerVersion{Version: "", Valid: false}}diff --git a/backend/cmd/installer/checker/helpers_test.go b/backend/cmd/installer/checker/helpers_test.goindex e2b65d93..5e7a74a6 100644--- a/backend/cmd/installer/checker/helpers_test.go+++ b/backend/cmd/installer/checker/helpers_test.go@@ -184,6 +184,24 @@ func TestCheckDockerComposeVersionWithRunner(t *testing.T) {}})+ t.Run("parses version from stdout even when error is returned", func(t *testing.T) {+ calls := 0+ result := checkDockerComposeVersionWithRunner(func(name string, args ...string) ([]byte, error) {+ calls+++ return []byte("Docker Compose version v2.12.2"), errors.New("exit status 1")+ })++ if calls != 1 {+ t.Fatalf("expected 1 command invocation, got %d", calls)+ }+ if result.Version != "2.12.2" {+ t.Fatalf("expected version 2.12.2, got %q", result.Version)+ }+ if !result.Valid {+ t.Fatal("expected docker compose version to remain valid when stdout is parseable")+ }+ })+t.Run("fails when docker compose is unavailable", func(t *testing.T) {calls := 0result := checkDockerComposeVersionWithRunner(func(name string, args ...string) ([]byte, error) {