Commit cee2a1e
authored
internal/testrunner/script: use repository root for RepositoryRoot (#3323)
addPackage and removePackage used os.OpenRoot(pkgRoot) to create the
RepositoryRoot passed to the package builder. This scoped filesystem
access to the package directory, not the repository root. When CI sets
ELASTIC_PACKAGE_REPOSITORY_LICENSE, the builder tries to read
licenses/Elastic-2.0.txt via the sandboxed os.Root, which cannot
traverse above the package directory.
Replace os.OpenRoot with files.FindRepositoryRootFrom, which walks up
from the given path to find .git and opens an os.Root there.
Fixes #33211 parent c8d48ae commit cee2a1e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments