From 4cc70a5aed0c233cdcc72077733f9da8450be386 Mon Sep 17 00:00:00 2001 From: David Daniel Date: Thu, 28 Oct 2021 19:38:28 -0700 Subject: [PATCH] fix: use process.cwd vs `.` which can fail When '.' does not work, this utility function outside the runtime closure can yield an unhelpful error for consumers. --- src/commands/readme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/readme.js b/src/commands/readme.js index dd3b1790a..ad401a0fc 100644 --- a/src/commands/readme.js +++ b/src/commands/readme.js @@ -11,7 +11,7 @@ import getReadmeFile from '../get-readme-file.js'; const command = 'readme [input..]'; const description = 'inject documentation into your README.md'; -const defaultReadmeFile = getReadmeFile('.'); +const defaultReadmeFile = getReadmeFile(process.cwd()); /** * Add yargs parsing for the readme command