Don't create orphaned-features.json if there are none (#50837)
This commit is contained in:
@@ -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'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user