Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #67 from Krinkle/patch-1
Browse files Browse the repository at this point in the history
copyDirSyncRecursive: Remove obsolete typeof check
  • Loading branch information
Ryan McGrath committed Jan 18, 2014
2 parents 012387c + f76a05e commit ad15e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wrench.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {

try {
if(fs.statSync(newDirLocation).isDirectory()) {
if(typeof opts !== 'undefined' && opts.forceDelete) {
if(opts.forceDelete) {
exports.rmdirSyncRecursive(newDirLocation);
} else {
return new Error('You are trying to delete a directory that already exists. Specify forceDelete in the opts argument to override this. Bailing~');
Expand Down

0 comments on commit ad15e01

Please sign in to comment.