Skip to content

Commit

Permalink
Merge pull request #4363 from andrewhsu/backport-rpk-admin-mac
Browse files Browse the repository at this point in the history
[v21.11.x] rpk cli missing redpanda on MacOS
  • Loading branch information
andrewhsu committed Apr 21, 2022
2 parents 0579a8f + d4c36d5 commit acd39d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/go/rpk/pkg/cli/cmd/redpanda_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2022 Vectorized, Inc.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.md
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0

//go:build darwin
// +build darwin

package cmd

import (
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/vectorizedio/redpanda/src/go/rpk/pkg/cli/cmd/redpanda/admin"
)

func NewRedpandaDarwinCommand(fs afero.Fs) *cobra.Command {
command := &cobra.Command{
Use: "redpanda",
Short: "Interact with a local or remote Redpanda process",
}

command.AddCommand(admin.NewCommand(fs))

return command
}
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/cmd/root_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/vectorizedio/redpanda/src/go/rpk/pkg/config"
)

// On MacOS this is a no-op.
func addPlatformDependentCmds(
fs afero.Fs, mgr config.Manager, cmd *cobra.Command,
) {
cmd.AddCommand(NewRedpandaDarwinCommand(fs))
}

0 comments on commit acd39d3

Please sign in to comment.