File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -162,17 +162,18 @@ func initGlobals() {
162162
163163 versionQualifier , versionQualified = os .LookupEnv ("VERSION_QUALIFIER" )
164164
165- agentPackageVersion = EnvOr (agentPackageVersionEnvVar , "" )
166-
167- ManifestURL = EnvOr (ManifestUrlEnvVar , "" )
168- PackagingFromManifest = ManifestURL != ""
169-
170- // order matters this must be called last as it will override some of the
171- // values above
165+ // order matters: this will override some of the values. Those values can be used
166+ // as fallback for the variables below (mainly agentPackageVersion and ManifestURL)
172167 err = initPackageVersion ()
173168 if err != nil {
174169 panic (fmt .Errorf ("failed to init package version: %w" , err ))
175170 }
171+
172+ agentPackageVersion = EnvOr (agentPackageVersionEnvVar , agentPackageVersion )
173+
174+ ManifestURL = EnvOr (ManifestUrlEnvVar , ManifestURL )
175+ PackagingFromManifest = ManifestURL != ""
176+
176177}
177178
178179// ProjectType specifies the type of project (OSS vs X-Pack).
You can’t perform that action at this time.
0 commit comments