Wraps .jsbeautifyrc file read into a try/catch since it could be no longer available.
This commit is contained in:
parent
1cb84db4f9
commit
f99e24cf6c
|
@ -633,9 +633,12 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
externalOptions = undefined
|
externalOptions = undefined
|
||||||
if configPath
|
if configPath
|
||||||
fs ?= require("fs")
|
fs ?= require("fs")
|
||||||
|
try
|
||||||
contents = fs.readFileSync(configPath,
|
contents = fs.readFileSync(configPath,
|
||||||
encoding : "utf8"
|
encoding : "utf8"
|
||||||
)
|
)
|
||||||
|
catch error
|
||||||
|
contents = null #file isnt available anymore
|
||||||
unless contents
|
unless contents
|
||||||
externalOptions = {}
|
externalOptions = {}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue