forked from MapComplete/MapComplete
Small fixes
This commit is contained in:
parent
5c0e3662c1
commit
3e3da25edb
18 changed files with 263 additions and 103 deletions
|
@ -13,6 +13,9 @@ Utils.runningFromConsole = true;
|
|||
function generateLicenseInfos(paths: string[]): SmallLicense[] {
|
||||
const licenses = []
|
||||
for (const path of paths) {
|
||||
try{
|
||||
|
||||
|
||||
const parsed = JSON.parse(readFileSync(path, "UTF-8"))
|
||||
if (Array.isArray(parsed)) {
|
||||
const l: SmallLicense[] = parsed
|
||||
|
@ -30,6 +33,8 @@ function generateLicenseInfos(paths: string[]): SmallLicense[] {
|
|||
|
||||
smallLicens.path = path.substring(0, 1 + path.lastIndexOf("/")) + smallLicens.path
|
||||
licenses.push(smallLicens)
|
||||
}}catch(e){
|
||||
console.error("Error: ",e, "while handling",path)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue