mirror of
https://github.com/Swatinem/rust-cache
synced 2025-04-18 09:49:02 +00:00
Only include env vars that are specific to Rust
This commit is contained in:
parent
5f6b32160d
commit
c4f3eceb2f
13
dist/restore/index.js
vendored
13
dist/restore/index.js
vendored
|
@ -59597,8 +59597,19 @@ async function getCargoBins() {
|
|||
}
|
||||
function getEnvKey() {
|
||||
const hasher = external_crypto_default().createHash("sha1");
|
||||
const validKeys = [
|
||||
/^CARGO_.+$/,
|
||||
/^CC_.+$/,
|
||||
/^CXX_.+$/,
|
||||
/^RUSTC_.+$/,
|
||||
/^RUSTC$/,
|
||||
/^RUSTDOC$/,
|
||||
/^RUSTDOCFLAGS$/,
|
||||
/^RUSTFLAGS$/,
|
||||
/^RUSTFMT$/,
|
||||
];
|
||||
for (const [key, value] of Object.entries(process.env)) {
|
||||
if (value) {
|
||||
if (validKeys.some((re) => re.test(key)) && value) {
|
||||
hasher.update(`${key}=${value}`);
|
||||
}
|
||||
}
|
||||
|
|
13
dist/save/index.js
vendored
13
dist/save/index.js
vendored
|
@ -59597,8 +59597,19 @@ async function getCargoBins() {
|
|||
}
|
||||
function getEnvKey() {
|
||||
const hasher = external_crypto_default().createHash("sha1");
|
||||
const validKeys = [
|
||||
/^CARGO_.+$/,
|
||||
/^CC_.+$/,
|
||||
/^CXX_.+$/,
|
||||
/^RUSTC_.+$/,
|
||||
/^RUSTC$/,
|
||||
/^RUSTDOC$/,
|
||||
/^RUSTDOCFLAGS$/,
|
||||
/^RUSTFLAGS$/,
|
||||
/^RUSTFMT$/,
|
||||
];
|
||||
for (const [key, value] of Object.entries(process.env)) {
|
||||
if (value) {
|
||||
if (validKeys.some((re) => re.test(key)) && value) {
|
||||
hasher.update(`${key}=${value}`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,8 +108,20 @@ export async function getCargoBins(): Promise<Set<string>> {
|
|||
|
||||
function getEnvKey(): string {
|
||||
const hasher = crypto.createHash("sha1");
|
||||
const validKeys = [
|
||||
/^CARGO_.+$/,
|
||||
/^CC_.+$/,
|
||||
/^CXX_.+$/,
|
||||
/^RUSTC_.+$/,
|
||||
/^RUSTC$/,
|
||||
/^RUSTDOC$/,
|
||||
/^RUSTDOCFLAGS$/,
|
||||
/^RUSTFLAGS$/,
|
||||
/^RUSTFMT$/,
|
||||
];
|
||||
|
||||
for (const [key, value] of Object.entries(process.env)) {
|
||||
if (value) {
|
||||
if (validKeys.some((re) => re.test(key)) && value) {
|
||||
hasher.update(`${key}=${value}`);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue