mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 13:30:03 +00:00
13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
import os from 'os';
|
|
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')];
|
|
}
|