soong: Fix trailing comma for one-line modules
This commit is contained in:
parent
b7beef9eac
commit
f35674701d
1 changed files with 4 additions and 2 deletions
|
@ -249,8 +249,10 @@ export function serializeModule(module: SoongModule) {
|
||||||
serialized = `${type} ${serialized}`
|
serialized = `${type} ${serialized}`
|
||||||
// Add trailing comma to last prop
|
// Add trailing comma to last prop
|
||||||
let serialLines = serialized.split('\n')
|
let serialLines = serialized.split('\n')
|
||||||
|
if (serialLines.length > 1) {
|
||||||
serialLines[serialLines.length - 2] = serialLines.at(-2) + ','
|
serialLines[serialLines.length - 2] = serialLines.at(-2) + ','
|
||||||
serialized = serialLines.join('\n')
|
serialized = serialLines.join('\n')
|
||||||
|
}
|
||||||
|
|
||||||
return serialized
|
return serialized
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue