Skip to content

Commit

Permalink
Better checking for package.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-seville committed Feb 23, 2013
1 parent 8948264 commit 98466ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var fs = require("fs"),
path = require("path"),
configPath = process.cwd() + '/package.json',
file = JSON.parse(fs.readFileSync(configPath, 'utf8')),
file = fs.exists(configPath) ? JSON.parse((fs.readFileSync(configPath, 'utf8')||{})) : {},
packageConfig = file.scripts &&
file.scripts.blanket,
pattern = packageConfig ?
Expand Down

0 comments on commit 98466ec

Please sign in to comment.