mirror of
https://github.com/Swatinem/rust-cache.git
synced 2025-08-14 20:55:13 +00:00
Fix EISDIR error due to globbed directories (#1)
This commit is contained in:
parent
6fd3edff69
commit
1cc4eb3f03
23
.github/workflows/globbed-directories.yml
vendored
Normal file
23
.github/workflows/globbed-directories.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
name: globbed-directories
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
simple:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
|
||||
name: Test `cargo check/test` on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create folder that will be globbed
|
||||
run: |
|
||||
mkdir -p folder/rust-toolchain
|
||||
- uses: ./
|
1
dist/restore/index.js
vendored
1
dist/restore/index.js
vendored
@ -59948,6 +59948,7 @@ class CacheConfig {
|
||||
const root = workspace.root;
|
||||
keyFiles.push(...(await globFiles(`${root}/**/Cargo.toml\n${root}/**/Cargo.lock\n${root}/**/rust-toolchain\n${root}/**/rust-toolchain.toml`)));
|
||||
}
|
||||
keyFiles = keyFiles.filter(file => !external_fs_default().statSync(file).isDirectory());
|
||||
keyFiles.sort((a, b) => a.localeCompare(b));
|
||||
hasher = external_crypto_default().createHash("sha1");
|
||||
for (const file of keyFiles) {
|
||||
|
1
dist/save/index.js
vendored
1
dist/save/index.js
vendored
@ -59948,6 +59948,7 @@ class CacheConfig {
|
||||
const root = workspace.root;
|
||||
keyFiles.push(...(await globFiles(`${root}/**/Cargo.toml\n${root}/**/Cargo.lock\n${root}/**/rust-toolchain\n${root}/**/rust-toolchain.toml`)));
|
||||
}
|
||||
keyFiles = keyFiles.filter(file => !external_fs_default().statSync(file).isDirectory());
|
||||
keyFiles.sort((a, b) => a.localeCompare(b));
|
||||
hasher = external_crypto_default().createHash("sha1");
|
||||
for (const file of keyFiles) {
|
||||
|
@ -141,6 +141,7 @@ export class CacheConfig {
|
||||
)),
|
||||
);
|
||||
}
|
||||
keyFiles = keyFiles.filter(file => !fs.statSync(file).isDirectory());
|
||||
keyFiles.sort((a, b) => a.localeCompare(b));
|
||||
|
||||
hasher = crypto.createHash("sha1");
|
||||
|
Loading…
x
Reference in New Issue
Block a user