Skip to content

Commit 237f636

Browse files
smondalsindresorhus
authored andcommittedDec 30, 2019
Minor refactoring (#23)
1 parent c432cb4 commit 237f636

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ const isWritable = path => {
1616

1717
module.exports = (options = {}) => {
1818
const {name} = options;
19-
let directory = options.cwd;
19+
let directory = options.cwd || process.cwd();
2020

2121
if (options.files) {
2222
directory = commonDir(directory, options.files);
23-
} else {
24-
directory = directory || process.cwd();
2523
}
2624

2725
directory = pkgDir.sync(directory);

0 commit comments

Comments
 (0)
Please sign in to comment.