diff --git a/dev-tools/mage/crossbuild.go b/dev-tools/mage/crossbuild.go index 8fcd1e2e6d1a..90fa07a4bb81 100644 --- a/dev-tools/mage/crossbuild.go +++ b/dev-tools/mage/crossbuild.go @@ -333,6 +333,8 @@ func (b GolangCrossBuilder) Build() error { "--env", "MAGEFILE_VERBOSE="+verbose, "--env", "MAGEFILE_TIMEOUT="+EnvOr("MAGEFILE_TIMEOUT", ""), "--env", fmt.Sprintf("SNAPSHOT=%v", Snapshot), + // See https://github.com/elastic/golang-crossbuild/issues/232 + "--env", "GIT_CEILING_DIRECTORIES=/", "-v", repoInfo.RootDir+":"+mountPoint, "-w", workDir, image,