Skip to content

Commit 3c695de

Browse files
committed
internal/server/storage/s3: Update logic for checking MinIO version from multiple possible binary names
Signed-off-by: Mathias Gibbens <[email protected]>
1 parent 041824a commit 3c695de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/server/storage/s3/miniod/admin_client.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ func (c *AdminClient) isMinIOClient() bool {
101101
return false
102102
}
103103

104-
if !strings.Contains(lines[0], "mc version") && !strings.Contains(lines[0], "mcli version") {
105-
return false
104+
for _, name := range []string{"miniocli", "minioc", "mcli", "minio-client", "mc"} {
105+
if strings.Contains(lines[0], name+" version") {
106+
return true
107+
}
106108
}
107109

108-
return true
110+
return false
109111
}
110112

111113
// ServiceStop stops the MinIO cluster.

0 commit comments

Comments
 (0)