diff options
| author | Patrice Arruda <patricearruda@google.com> | 2019-07-03 10:47:34 -0700 |
|---|---|---|
| committer | Luca Stefani <luca.stefani.ge1@gmail.com> | 2019-09-04 15:33:28 +0200 |
| commit | f60bb1bdd07a2590bd4843caeb4069f7a4df4a72 (patch) | |
| tree | 85b7a5de29a80e07a0d7c50da387ceb46df7bfd7 /ui/build/config.go | |
| parent | 346a749ccb348cc682845a33a84351d0455dc5f7 (diff) | |
| download | build_soong-f60bb1bdd07a2590bd4843caeb4069f7a4df4a72.tar.gz build_soong-f60bb1bdd07a2590bd4843caeb4069f7a4df4a72.tar.bz2 build_soong-f60bb1bdd07a2590bd4843caeb4069f7a4df4a72.zip | |
soong_ui: Build under a path that contains a symbolic link.
The build directory passed in to soong_ui can contain a
symbolic link. soong_ui was not evaluating the build
directory to retrieve the true path, hence failing to
execute the internal soong.
Fixes: b/135995632
Test: Unit test case and executed the scenario in the bug
description.
Change-Id: I5779c6aa3f3183810437dbe2b2d4e40acbafb205
Diffstat (limited to 'ui/build/config.go')
| -rw-r--r-- | ui/build/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/build/config.go b/ui/build/config.go index 50412d59..7148c177 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -267,6 +267,10 @@ func getConfigArgs(action BuildAction, dir string, buildDependencies bool, ctx C if err != nil { ctx.Fatalf("Error retrieving top directory: %v", err) } + dir, err = filepath.EvalSymlinks(dir) + if err != nil { + ctx.Fatalf("Unable to evaluate symlink of %s: %v", dir, err) + } dir, err = filepath.Abs(dir) if err != nil { ctx.Fatalf("Unable to find absolute path %s: %v", dir, err) |
