Skip to content

Commit

Permalink
log version only if on version option given
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Jan 7, 2025
1 parent 0733039 commit 0f370b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/garbagecollector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func getObjectMetdata(ctx context.Context, bucketFlag string, object minio.Objec
}

func main() {
s3backuplog.InfoPrint("%s %s %s %s", os.Args[0], version, commit, date)
var printVersion bool
endpointFlag := flag.String("endpoint", "", "S3 Endpoint without https/http , host:port")
secureFlag := flag.Bool("usessl", false, "Use SSL for endpoint connection: default: false")
Expand All @@ -88,6 +87,7 @@ func main() {
fmt.Println(version)
os.Exit(0)
}
s3backuplog.InfoPrint("%s %s %s %s", os.Args[0], version, commit, date)
if *endpointFlag == "" || *accessKeyID == "" || (*secretKey == "" && *secretKeyFile == "") || *bucketFlag == "" {
flag.Usage()
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/pmoxs3backuproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func certFingeprint(cfile string) *string {
}

func main() {
s3backuplog.InfoPrint("%s %s %s %s", os.Args[0], version, commit, date)
var printVersion bool
certFlag := flag.String("cert", "server.crt", "Server SSL certificate file")
keyFlag := flag.String("key", "server.key", "Server SSL key file")
Expand All @@ -130,6 +129,7 @@ func main() {
fmt.Println(version)
os.Exit(0)
}
s3backuplog.InfoPrint("%s %s %s %s", os.Args[0], version, commit, date)
if *endpointFlag == "" {
flag.Usage()
os.Exit(1)
Expand Down

0 comments on commit 0f370b8

Please sign in to comment.