mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-05-16 05:00:03 +00:00
Add restore cache.
This commit is contained in:
parent
7b19c2c567
commit
8cbd5dda6b
3 changed files with 54 additions and 18 deletions
|
@ -3,3 +3,11 @@ import path from 'path';
|
|||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
export const CARGO_HOME = process.env.CARGO_HOME || path.join(os.homedir(), '.cargo');
|
||||
|
||||
export function getPrimaryCacheKey(): string {
|
||||
return `setup-rustcargo-${process.platform}`;
|
||||
}
|
||||
|
||||
export function getPathsToCache(): string[] {
|
||||
return [path.join(CARGO_HOME, 'registry')];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue