[BUG]

#54 · closed · 2 comments

View on GitHub ↗

liorp

**Describe the bug** <!-- A clear and concise description of what the bug is. --> When running with a glob such as 'src/**/*.js', it will not run for files directly under js (I suspect it has something to do with greediness in one of the glob packages, since running `glob` from npm and `ls src/**/*.js` return the right amount of files). **To Reproduce** <!-- Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error --> Create a project with the following structure: src/ index.js folder1/ temp1.js folder2/ temp2.js Run dmdm src/**/*.js **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> dmdm should run on 3 files - temp1.js, temp2.js, index.js **Screenshots** <img width="1013" alt="Screenshot 2024-05-02 at 22 18 09" src="https://github.com/acrazing/dpdm/assets/4294489/832a846a-d1af-4ae3-a50b-41f3fbe82158"> <!-- If applicable, add screenshots to help explain your problem. --> **Additional context** <!-- Add any other context about the problem here. -->

Comments

liorp

I have a strong suspicion - I think that bash is somehow responsible for this mess. As it seems, `ls src/**/*.js` expands properly in zsh to include `src` itself, whilst in bash it wouldn't include files from `src` itself.

liorp

Yup, seems that [npm runs scripts in sh](https://docs.npmjs.com/cli/v10/using-npm/scripts#exiting). Sorry about this one.