Skip to content

Commit 1c1d307

Browse files
pchilacmacknz
andauthored
Fix default beat name to elastic-agent instead of the repo directory name (#4774)
* Fix default beat name to elastic-agent instead of the repo directory name Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co> --------- Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
1 parent bd51cbd commit 1c1d307

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dev-tools/mage/settings.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const (
4141

4242
elasticAgentModulePath = "github.com/elastic/elastic-agent"
4343

44+
defaultName = "elastic-agent"
45+
4446
// Env vars
4547
// agent package version
4648
agentPackageVersionEnvVar = "AGENT_PACKAGE_VERSION"
@@ -73,7 +75,7 @@ var (
7375
// the crossbuild images at /go/pkg/mod, read-only, when set to true.
7476
CrossBuildMountModcache = true
7577

76-
BeatName = EnvOr("BEAT_NAME", filepath.Base(CWD()))
78+
BeatName = EnvOr("BEAT_NAME", defaultName)
7779
BeatServiceName = EnvOr("BEAT_SERVICE_NAME", BeatName)
7880
BeatIndexPrefix = EnvOr("BEAT_INDEX_PREFIX", BeatName)
7981
BeatDescription = EnvOr("BEAT_DESCRIPTION", "")

0 commit comments

Comments
 (0)