diff options
| author | 2024-01-04 02:17:51 +0000 | |
|---|---|---|
| committer | 2024-01-04 02:17:51 +0000 | |
| commit | b284c72d66b4435ed07e62cf564d7a31373e65d3 (patch) | |
| tree | 3db850bd8ee345fd4b2f6575b92eb2dd0f5592da | |
| parent | 98aa78ab22e04a26af9ff39a39d9ecfdea5fb845 (diff) | |
| parent | 3b3a0114089ca97ac36ca37a4cea72f98a2018bb (diff) | |
Merge "Check for errors in preparer.sh" into main
| -rw-r--r-- | android/packaging.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/packaging.go b/android/packaging.go index 2506378d7..8873540c5 100644 --- a/android/packaging.go +++ b/android/packaging.go @@ -240,10 +240,14 @@ func (p *PackagingBase) GatherPackagingSpecs(ctx ModuleContext) map[string]Packa // CopySpecsToDir is a helper that will add commands to the rule builder to copy the PackagingSpec // entries into the specified directory. func (p *PackagingBase) CopySpecsToDir(ctx ModuleContext, builder *RuleBuilder, specs map[string]PackagingSpec, dir WritablePath) (entries []string) { + if len(specs) == 0 { + return entries + } seenDir := make(map[string]bool) preparerPath := PathForModuleOut(ctx, "preparer.sh") cmd := builder.Command().Tool(preparerPath) var sb strings.Builder + sb.WriteString("set -e\n") for _, k := range SortedKeys(specs) { ps := specs[k] destPath := filepath.Join(dir.String(), ps.relPathInPackage) |