1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Don't create orphaned-features.json if there are none (#50837)

This commit is contained in:
Peter Bengtsson
2024-05-28 08:32:18 -04:00
committed by GitHub
parent ce10e8f6ef
commit bb4831c375

View File

@@ -111,7 +111,9 @@ export async function find(options: Options) {
)
if (options.output) {
if (options.output.endsWith('.json')) {
fs.writeFileSync(options.output, JSON.stringify(remaining, null, 2))
if (remaining.length) {
fs.writeFileSync(options.output, JSON.stringify(remaining, null, 2))
}
} else {
fs.writeFileSync(options.output, remaining.join('\n'))
}