Fix: remove empty license files, fix #1135

This commit is contained in:
Pieter Vander Vennet 2023-06-14 01:47:39 +02:00
parent 239cb8f63d
commit 2eabfea8af

View file

@ -226,7 +226,13 @@ export class GenerateLicenseInfo extends Script {
}
licenses.sort((a, b) => (a.path < b.path ? -1 : 1))
writeFileSync(dir + "/license_info.json", JSON.stringify(licenses, null, 2))
const path = dir + "/license_info.json"
if(licenses.length === 0){
console.log("Removing",path,"as it is empty")
// No need to _actually_ unlik, this is done above
}else{
writeFileSync(path, JSON.stringify(licenses, null, 2))
}
})
}