Skip to content

Optimization of algorithms for complex patterns #156

@keenwon

Description

@keenwon

Environment

  • OS Version: Manjaro Linux x86_64
  • Node.js Version: v11.8.0

Actual behavior

(node:22393) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied

Steps to reproduce and Code sample

.
├── dir
│   ├── one
│   │   ├── a
│   │   │   └── 1.js
│   │   └── b
│   │       └── 2.js
│   └── two [error opening dir]
├── dir2
│   └── one
│       ├── a
│       │   └── 1.js
│       └── b
│           └── 2.js
├── fast-glob.js
├── package.json
└── package-lock.json
// fast-glob.js
const fg = require('fast-glob');
fg(['+(dir|dir2)/one/**/*']).then((entries) => console.log(entries));
$ node fast-glob.js
(node:22859) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, scandir '/home/keenwon/Test/fast-glob-test/dir/two'
(node:22859) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:22859) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

current user doesn't have permission to access dir/two:

total 8.0K
drwxr-xr-x 4 keenwon keenwon 4.0K 2月  13 17:37 one
dr-x------ 2 root    root    4.0K 2月  13 17:54 two

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions