This commit is contained in:
Miles Johnson 2023-04-17 14:13:30 -07:00
parent 293503e099
commit 81acac128f
4 changed files with 20 additions and 22 deletions

View file

@ -1,9 +1,13 @@
import os from 'os';
import path from 'path';
import * as cache from '@actions/cache';
import * as core from '@actions/core';
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
export const CARGO_HOME = process.env.CARGO_HOME || path.join(os.homedir(), '.cargo');
export const CACHE_ENABLED = core.getBooleanInput('cache') || cache.isFeatureAvailable();
export function getPrimaryCacheKey(): string {
return `setup-rustcargo-${process.platform}`;
}