Open
Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
cd /
vuepress -v
What is expected?
Output the version number
What is actually happening?
The command would either be stuck or throw an EACESS
error.
Other relevant information
It's caused by this function:
vuepress/packages/vuepress/lib/handleUnknownCommand.js
Lines 55 to 62 in 4ddf552
There are several problems with this approach:
- For global commands such as
--version
,--help
, this detection is redundant; - Should have error handling if permission issue encountered;
- There's performance bottleneck in
globby
if used in a large directory (say, the user home directory), should output a progress indicator in that case (e.g. "Searching for documentation under the current directory…").