Skip to content

Commit

Permalink
Minor refactoring (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
smondal authored and sindresorhus committed Dec 30, 2019
1 parent c432cb4 commit 237f636
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Expand Up @@ -16,12 +16,10 @@ const isWritable = path => {

module.exports = (options = {}) => {
const {name} = options;
let directory = options.cwd;
let directory = options.cwd || process.cwd();

if (options.files) {
directory = commonDir(directory, options.files);
} else {
directory = directory || process.cwd();
}

directory = pkgDir.sync(directory);
Expand Down

0 comments on commit 237f636

Please sign in to comment.