@@ -2,7 +2,7 @@ import * as core from "@actions/core";
2
2
import * as exec from "@actions/exec" ;
3
3
4
4
import { cleanBin , cleanGit , cleanRegistry , cleanTargetDir } from "./cleanup" ;
5
- import { CacheConfig } from "./config" ;
5
+ import { CacheConfig , isCacheUpToDate } from "./config" ;
6
6
import { getCacheProvider , reportError } from "./utils" ;
7
7
8
8
process . on ( "uncaughtException" , ( e ) => {
@@ -22,20 +22,13 @@ async function run() {
22
22
}
23
23
24
24
try {
25
- //const cfg = CacheConfig.fromState();
26
- //console.log("CARGO BINS - SAVE:");
27
- //console.log(cfg.cargoBins);
28
-
29
- //if (isCacheUpToDate()) {
30
- // core.info(`Cache up-to-date.`);
31
- // return;
32
- //}
25
+ if ( isCacheUpToDate ( ) ) {
26
+ core . info ( `Cache up-to-date.` ) ;
27
+ return ;
28
+ }
33
29
34
- //const config = CacheConfig.fromState();
35
- const config = await CacheConfig . new ( ) ;
30
+ const config = CacheConfig . fromState ( ) ;
36
31
config . printInfo ( cacheProvider ) ;
37
- console . log ( "CARGO BINS - SAVE:" ) ;
38
- console . log ( config . cargoBins ) ;
39
32
core . info ( "" ) ;
40
33
41
34
// TODO: remove this once https://github.com/actions/toolkit/pull/553 lands
0 commit comments