Glob pattern dist/**/* doesn't discover top level (within dist/) files
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
**Is your feature request related to a problem? Please describe.**
When using `buildkite-agent artifact download "dist/**/*" .` to download all artifacts in a compiled `dist` folder that has successfully been uploaded using `artifact_paths: "dist/**/*"` in the `pipeline.yml` file, the files downloaded do not contain files such as `dist/express.js` or `dist/worker.js`.
This seems [unexpected for the given glob pattern](https://www.digitalocean.com/community/tools/glob?comments=true&glob=dist%2F%2A%2A%2F%2A&matches=false&tests=%2F%2F%20This%20will%20match%20as%20it%20ends%20with%20%27.js%27&tests=dist%2Ffolder%2Ffile.js&tests=%2F%2F%20This%20won%27t%20match%21&tests=dist%2Ffile.js).
**NOTE**: The above pattern does download all files that are contained in subdirectories, for example, dist/apps/express.js and dist/apps/worker.js are successfully downloaded with the above command.
**Describe the solution you'd like**
A solution that allows me to download files described above with the glob pattern `dist/**/*`. Otherwise, documentation to explain why this pattern does not work for `buildkite-agent`
**Describe alternatives you've considered**
I have found a workaround by using `buildkite-agent artifact download "dist/**" .`, however, unsure if this was intended behaviour or not.
**Additional context**
N/A
Contributor guide
Research direction
Start by reproducing the issue with `buildkite-agent artifact download "dist/**/*" .` and the corresponding `artifact_paths` in `pipeline.yml`, then trace the agent's artifact-download glob handling. Done means top-level files such as `dist/express.js` are downloaded, or the documentation clearly explains why `dist/**` is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ci-cd, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100