mirror of
https://github.com/toddbluhm/env-cmd.git
synced 2025-12-08 18:23:33 +00:00
commit
d6404f1f01
@ -103,6 +103,12 @@ export async function getRCFile (
|
|||||||
}
|
}
|
||||||
throw new Error(errorText)
|
throw new Error(errorText)
|
||||||
}
|
}
|
||||||
|
if (e.name === 'ParseError') {
|
||||||
|
if (verbose === true) {
|
||||||
|
console.info(e.message);
|
||||||
|
}
|
||||||
|
throw new Error(e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export async function getRCFileVars (
|
|||||||
parsedData = JSON.parse(file)
|
parsedData = JSON.parse(file)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const parseError = new Error(`Failed to parse .rc file at path: ${absolutePath}`)
|
const parseError = new Error(`Failed to parse .rc file at path: ${absolutePath}.\n${e.message}`)
|
||||||
parseError.name = 'ParseError'
|
parseError.name = 'ParseError'
|
||||||
throw parseError
|
throw parseError
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user