Permalink
Browse files

Merge pull request #7 from pwmckenna/master

deprecation warning fix
  • Loading branch information...
2 parents 64c3e49 + 889d483 commit 341a71ae6679a98566eb2e0170d27ae721bbc5cf Oncle Tom committed Dec 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 tasks/crx.js
View
@@ -34,16 +34,18 @@ function configure(defaults){
var grunt = this;
var self = grunt.task.current;
var p = buildConfigProperty.bind(self);
+ // Support both 0.6 and 0.8. path.existsSync is deprecated
+ var existsSync = fs.existsSync || path.existsSync;
// Configuring stuff
self.requiresConfig(p('dest'), p('src'));
grunt.utils._.defaults(self.data, defaults);
// Checking availability
- if (!path.existsSync(self.file.src)){
+ if (!existsSync(self.file.src)){
throw self.taskError('Unable to locate source directory.');
}
- if (!path.existsSync(self.data.privateKey)){
+ if (!existsSync(self.data.privateKey)){
throw self.taskError('Unable to locate your private key.');
}

0 comments on commit 341a71a

Please sign in to comment.