Closed timbze closed 1 year ago
Hello @timbze
I believe this is incorrect usage of the hashFiles
. This feature uses Golang's filepath.Glob
for reference. You will need to change your value to "**/**/packages.lock.json"
from "**/packages.lock.json"
to include subdirectories of directories.
$ tree
.
|-- a
| |-- e
| | `-- test.log
| |-- f
| | `-- test.log
| `-- g
| `-- test.log
|-- b
| |-- e
| | `-- test.log
| |-- f
| | `-- test.log
| `-- g
| `-- test.log
|-- c
| |-- e
| | `-- test.log
| |-- f
| | `-- test.log
| `-- g
| `-- test.log
`-- main.go
13 directories, 10 files
$ go run ./main.go -path "**/test.log"
[] <nil>
$ go run ./main.go -path "**/**/test.log"
[a/e/test.log a/f/test.log a/g/test.log b/e/test.log b/f/test.log b/g/test.log c/e/test.log c/f/test.log c/g/test.log] <nil>
Amazing 😄 you wouldn't guess how much time I had wasted with this 🙈
Thank you
Describe the bug It seems that hashFiles is not working in my case.
hashFiles
was implemented in #198 by @ste93cry (for reference).Is there anything I'm doing wrong? (details below)
Here's the log from the cache restore. Notice these almost at the end:
logs_drone-cache.log
When I run find before the cache restore I get the files
find . -type f -name packages.lock.json
I am using drone-cache 1.4.0