{nodejs,bowerjs}-project-mode: stop error if json is malformed
This commit is contained in:
parent
329d20a618
commit
30fa9219e8
2 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@
|
||||||
(package-file (f-expand "package.json" project-path))
|
(package-file (f-expand "package.json" project-path))
|
||||||
deps)
|
deps)
|
||||||
(awhen (and (not hash) (f-exists? package-file)
|
(awhen (and (not hash) (f-exists? package-file)
|
||||||
(json-read-file package-file))
|
(ignore-errors (json-read-file package-file)))
|
||||||
(puthash project-path it npm-conf)))
|
(puthash project-path it npm-conf)))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
(package-file (f-expand "bower.json" project-path))
|
(package-file (f-expand "bower.json" project-path))
|
||||||
deps)
|
deps)
|
||||||
(awhen (and (not hash) (f-exists? package-file)
|
(awhen (and (not hash) (f-exists? package-file)
|
||||||
(json-read-file package-file))
|
(ignore-errors (json-read-file package-file)))
|
||||||
(puthash project-path it bower-conf)))
|
(puthash project-path it bower-conf)))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue