Skip to content

Commit

Permalink
Un-hide --base-path install flag (#3517)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0ba1a44)
  • Loading branch information
ycombinator authored and mergify[bot] committed Oct 5, 2023
1 parent a172a12 commit e7439e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions internal/pkg/agent/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ would like the Agent to operate.
cmd.Flags().String(flagInstallBasePath, paths.DefaultBasePath, "The path where the Elastic Agent will be installed. It must be an absolute path.")
addEnrollFlags(cmd)

// We are not supporting a custom base path, supplied via the `--base-path` CLI
// flag, just yet because we don't have Endpoint support for it yet. So we mark
// this flag as hidden.
// See also: https://github.com/elastic/elastic-agent/pull/2592
_ = cmd.Flags().MarkHidden(flagInstallBasePath)

return cmd
}

Expand Down
9 changes: 0 additions & 9 deletions testing/integration/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ func TestInstallWithBasePath(t *testing.T) {
err = fixture.Prepare(context.Background())
require.NoError(t, err)

// The `--base-path` flag is defined for the `elastic-agent install` CLI sub-command BUT
// it is hidden (see https://github.com/elastic/elastic-agent/pull/2592). So we validate
// here that the usage text for the `install` sub-command does NOT mention the `--base-path`
// flag in it.
const basePathFlag = "--base-path"
output, err := fixture.Exec(context.Background(), []string{"help", "install"})
require.NoError(t, err)
require.NotContains(t, string(output), basePathFlag)

// Set up random temporary directory to serve as base path for Elastic Agent
// installation.
tmpDir := t.TempDir()
Expand Down

0 comments on commit e7439e2

Please sign in to comment.